From nobody@FreeBSD.org  Tue Nov  5 12:18:16 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id E6E42F4A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Nov 2013 12:18:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id D500622B1
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Nov 2013 12:18:16 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA5CIGeP077597
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 5 Nov 2013 12:18:16 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA5CIGhO077594;
	Tue, 5 Nov 2013 12:18:16 GMT
	(envelope-from nobody)
Message-Id: <201311051218.rA5CIGhO077594@oldred.freebsd.org>
Date: Tue, 5 Nov 2013 12:18:16 GMT
From: Robin Hahling <robin.hahling@gw-computing.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: df(1): -h and -H option: manual page have them swapped
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183681
>Category:       docs
>Synopsis:       df(1): -h and -H option: manual page have them swapped
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wblock
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 12:20:00 UTC 2013
>Closed-Date:    Mon Jan 20 23:29:40 UTC 2014
>Last-Modified:  Mon Jan 20 23:29:40 UTC 2014
>Originator:     Robin Hahling
>Release:        10.0-BETA1
>Organization:
EPFL
>Environment:
FreeBSD odin-fbsd-current 10.0-BETA1 FreeBSD 10.0-BETA1 #0 r256420: Sun Oct 13 01:43:07 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The manual page of df(1) has the -h and -H options swapped.
The bug exists since 2012-11-16 and has been introduced by this commit (r243129):
http://lists.freebsd.org/pipermail/svn-src-all/2012-November/061588.html

-h option has historically been based on powers of 1024 whereas -H options on powers of 1000.

If you run the following:
% df -h; df -H
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p2    112G    2.1G    101G     2%    /
devfs          1.0K    1.0K      0B   100%    /dev
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p2    121G    2.3G    109G     2%    /
devfs          1.0k    1.0k      0B   100%    /dev

You can notice that sizes with -H are actually larger, hence based on powers of 1000.

Thus, the manual page have them wrong (swapped), since the aforementioned commit:
     -H      ``Human-readable'' output.  Use unit suffixes: Byte, Kibibyte,
             Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of
             1024) in order to reduce the number of digits to four or fewer.

     -h      ``Human-readable'' output.  Use unit suffixes: Byte, Kilobyte,
             Megabyte, Gigabyte, Terabyte and Petabyte (based on powers of
             1000) in order to reduce the number of digits to four or fewer.
>How-To-Repeat:
Have a look at the manual page and compare it with the output of df -h; df -H (or have a look at bin/df.c).
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->wblock 
Responsible-Changed-By: wblock 
Responsible-Changed-When: Thu Jan 16 17:00:58 UTC 2014 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183681 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/183681: commit references a PR
Date: Thu, 16 Jan 2014 17:06:09 +0000 (UTC)

 Author: wblock (doc committer)
 Date: Thu Jan 16 17:06:02 2014
 New Revision: 260782
 URL: http://svnweb.freebsd.org/changeset/base/260782
 
 Log:
   -h and -H options backwards in manual page.
   
   PR:		bin/183681 docs/183681
   Submitted by:	Robin Hahling <robin.hahling@gw-computing.net>
   MFC after:	3 days
 
 Modified:
   head/bin/df/df.1
 
 Modified: head/bin/df/df.1
 ==============================================================================
 --- head/bin/df/df.1	Thu Jan 16 16:44:23 2014	(r260781)
 +++ head/bin/df/df.1	Thu Jan 16 17:06:02 2014	(r260782)
 @@ -29,7 +29,7 @@
  .\"     @(#)df.1	8.3 (Berkeley) 5/8/95
  .\" $FreeBSD$
  .\"
 -.Dd January 24, 2013
 +.Dd January 16, 2014
  .Dt DF 1
  .Os
  .Sh NAME
 @@ -83,13 +83,13 @@ Use 1073741824 byte (1 Gibibyte) blocks 
  This overrides any
  .Ev BLOCKSIZE
  specification from the environment.
 -.It Fl H
 +.It Fl h
  .Dq Human-readable
  output.
  Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and
  Pebibyte (based on powers of 1024) in order to reduce the number of
  digits to four or fewer.
 -.It Fl h
 +.It Fl H
  .Dq Human-readable
  output.
  Use unit suffixes: Byte, Kilobyte, Megabyte,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/183681: commit references a PR
Date: Thu, 16 Jan 2014 17:06:09 +0000 (UTC)

 Author: wblock (doc committer)
 Date: Thu Jan 16 17:06:02 2014
 New Revision: 260782
 URL: http://svnweb.freebsd.org/changeset/base/260782
 
 Log:
   -h and -H options backwards in manual page.
   
   PR:		bin/183681 docs/183681
   Submitted by:	Robin Hahling <robin.hahling@gw-computing.net>
   MFC after:	3 days
 
 Modified:
   head/bin/df/df.1
 
 Modified: head/bin/df/df.1
 ==============================================================================
 --- head/bin/df/df.1	Thu Jan 16 16:44:23 2014	(r260781)
 +++ head/bin/df/df.1	Thu Jan 16 17:06:02 2014	(r260782)
 @@ -29,7 +29,7 @@
  .\"     @(#)df.1	8.3 (Berkeley) 5/8/95
  .\" $FreeBSD$
  .\"
 -.Dd January 24, 2013
 +.Dd January 16, 2014
  .Dt DF 1
  .Os
  .Sh NAME
 @@ -83,13 +83,13 @@ Use 1073741824 byte (1 Gibibyte) blocks 
  This overrides any
  .Ev BLOCKSIZE
  specification from the environment.
 -.It Fl H
 +.It Fl h
  .Dq Human-readable
  output.
  Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and
  Pebibyte (based on powers of 1024) in order to reduce the number of
  digits to four or fewer.
 -.It Fl h
 +.It Fl H
  .Dq Human-readable
  output.
  Use unit suffixes: Byte, Kilobyte, Megabyte,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: wblock 
State-Changed-When: Mon Jan 20 23:28:58 UTC 2014 
State-Changed-Why:  
Fix committed to -CURRENT and MFCed to 10-STABLE and 9-STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183681 
>Unformatted:
