Add -g for gigabyte sizes.

Approved by:	jkh
This commit is contained in:
John W. De Boskey 2000-06-03 20:17:39 +00:00
parent 57b1db33a5
commit 93a3fa19b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61227
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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;