Subject: bin/36817: df -g has changed
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <zafer@aydogan.de>
List: netbsd-bugs
Date: 08/21/2007 19:15:00
>Number:         36817
>Category:       bin
>Synopsis:       df -g has changed
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 21 19:15:00 +0000 2007
>Originator:     Zafer Aydogan
>Release:        4.99.28
>Organization:
>Environment:
i386
>Description:
This is a change request.

df -g has been showing values in gigabytes until the commit on June 24 2007. 
Now df -g has been replaced to show a solaris like -g (all fields of the structures returned by statvfs(2)) and the original -g has become -G.

Please restore the original functionality of option -g showing values in gigabytes and move solaris like g to another letter, for example -G.

Isn't there a TNF commit rule to preserve existing options ?

Thanks, Zafer.

>How-To-Repeat:
enter df -g on a system before Jun 24 2007 and later to see the difference behaviour of -g

>Fix:
--- df.c.orig   2007-08-21 19:43:23.000000000 +0200
+++ df.c        2007-08-21 19:44:06.000000000 +0200
@@ -96,11 +96,11 @@
                case 'a':
                        aflag = 1;
                        break;
-               case 'G':
+               case 'g':
                        hflag = 0;
                        usize = 1024 * 1024 * 1024;
                        break;
-               case 'g':
+               case 'G':
                        gflag = 1;
                        break;
                case 'h':