Date: 4 Sep 1999 20:42:54 -0000 From: mwm@phone.net To: FreeBSD-gnats-submit@freebsd.org Subject: bin/13579: df is missing a Posix flag Message-ID: <19990904204254.18532.qmail@guru.phone.net>
next in thread | raw e-mail | index | archive | help
>Number: 13579
>Category: bin
>Synopsis: df is missing a Posix flag
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Sep 4 13:50:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Mike Meyer
>Release: FreeBSD 3.2-STABLE i386
>Organization:
Missionaria Phonibalonica
>Environment:
older 3.2-stable system, but probably not fixed in -current
>Description:
The Posix df has a "P" flag that forces Posix-compliant output.
Since the output of df is already properly formatted, the only
change required is that it set the block size to the Posix default
of 512 bytes.
>How-To-Repeat:
Run the command "df -P", and notice that you get an error message.
>Fix:
Here's the patch to df.c
*** df.c-orig Sat Sep 4 13:37:52 1999
--- df.c Sat Sep 4 13:38:45 1999
***************
*** 88,100 ****
char *mntpt, *mntpath, **vfslist;
vfslist = NULL;
! while ((ch = getopt(argc, argv, "iknt:")) != -1)
switch (ch) {
case 'i':
iflag = 1;
break;
case 'k':
putenv("BLOCKSIZE=1k");
break;
case 'n':
nflag = 1;
--- 88,103 ----
char *mntpt, *mntpath, **vfslist;
vfslist = NULL;
! while ((ch = getopt(argc, argv, "iknPt:")) != -1)
switch (ch) {
case 'i':
iflag = 1;
break;
case 'k':
putenv("BLOCKSIZE=1k");
+ break;
+ case 'P':
+ putenv("BLOCKSIZE=512");
break;
case 'n':
nflag = 1;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990904204254.18532.qmail>
