From owner-freebsd-bugs Sat Sep 4 13:50:19 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3898515668 for <freebsd-bugs@FreeBSD.org>; Sat, 4 Sep 1999 13:50:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA88813; Sat, 4 Sep 1999 13:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from guru.phone.net (guru.phone.net [209.157.82.120]) by hub.freebsd.org (Postfix) with SMTP id 5DAF314C4F for <FreeBSD-gnats-submit@freebsd.org>; Sat, 4 Sep 1999 13:42:55 -0700 (PDT) (envelope-from mwm@phone.net) Received: (qmail 18533 invoked by uid 100); 4 Sep 1999 20:42:54 -0000 Message-Id: <19990904204254.18532.qmail@guru.phone.net> Date: 4 Sep 1999 20:42:54 -0000 From: mwm@phone.net Reply-To: mwm@phone.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/13579: df is missing a Posix flag Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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