From 93a3fa19b5e99c6e6e5bcd606540b010a44c42d7 Mon Sep 17 00:00:00 2001 From: "John W. De Boskey" Date: Sat, 3 Jun 2000 20:17:39 +0000 Subject: [PATCH] Add -g for gigabyte sizes. Approved by: jkh --- bin/df/df.1 | 5 +++++ bin/df/df.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/df/df.1 b/bin/df/df.1 index e785321d6531..9660183b033e 100644 --- a/bin/df/df.1 +++ b/bin/df/df.1 @@ -71,6 +71,11 @@ Use 512-byte blocks rather than the default. Note that this overrides the .Ev BLOCKSIZE specification from the environment. +.It Fl g +Use 1073741824-byte (1-Gbyte) blocks rather than the default. Note that +this overrides the +.Ev BLOCKSIZE +specification from the environment. .It Fl H "Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the number of diff --git a/bin/df/df.c b/bin/df/df.c index f75b468905e9..fc8cb344547b 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -122,7 +122,7 @@ main(argc, argv) char *mntpt, *mntpath, **vfslist; vfslist = NULL; - while ((ch = getopt(argc, argv, "abHhikmnPt:")) != -1) + while ((ch = getopt(argc, argv, "abgHhikmnPt:")) != -1) switch (ch) { case 'a': aflag = 1; @@ -133,6 +133,10 @@ main(argc, argv) putenv("BLOCKSIZE=512"); hflag = 0; break; + case 'g': + putenv("BLOCKSIZE=1g"); + hflag = 0; + break; case 'H': hflag = UNITS_SI; valp = vals_si;