mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Add -m (megabytes) and -g (gigabytes) options. I'm tired of being told
I can't do this. MFC: 1 month
This commit is contained in:
parent
a2dd76d5dc
commit
7e8409a7a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168227
@ -60,8 +60,10 @@ If invoked as
|
||||
the
|
||||
.Fl s
|
||||
option is implied, and only the
|
||||
.Fl k
|
||||
option is legal.
|
||||
.Fl [kmg]
|
||||
and
|
||||
.Fl h
|
||||
options are legal.
|
||||
.Pp
|
||||
If the
|
||||
.Fl M
|
||||
@ -86,6 +88,14 @@ Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.
|
||||
Print sizes in kilobytes, regardless of the setting of the
|
||||
.Ev BLOCKSIZE
|
||||
environment variable.
|
||||
.It Fl m
|
||||
Print sizes in megabytes, regardless of the setting of the
|
||||
.Ev BLOCKSIZE
|
||||
environment variable.
|
||||
.It Fl g
|
||||
Print sizes in gigabytes, regardless of the setting of the
|
||||
.Ev BLOCKSIZE
|
||||
environment variable.
|
||||
.It Fl T
|
||||
Print the number of used and free slots in several system tables.
|
||||
This is useful for checking to see how large system tables have become
|
||||
|
@ -122,8 +122,8 @@ main(int argc, char *argv[])
|
||||
opts = argv[0];
|
||||
if (!strcmp(opts, "swapinfo")) {
|
||||
swapflag = 1;
|
||||
opts = "hkM:N:";
|
||||
usagestr = "swapinfo [-hk] [-M core [-N system]]";
|
||||
opts = "ghkmM:N:";
|
||||
usagestr = "swapinfo [-ghkm] [-M core [-N system]]";
|
||||
} else {
|
||||
opts = "TM:N:hfknst";
|
||||
usagestr = "pstat [-Tfhknst] [-M core [-N system]]";
|
||||
@ -134,12 +134,18 @@ main(int argc, char *argv[])
|
||||
case 'f':
|
||||
fileflag = 1;
|
||||
break;
|
||||
case 'g':
|
||||
putenv("BLOCKSIZE=1G");
|
||||
break;
|
||||
case 'h':
|
||||
humanflag = 1;
|
||||
break;
|
||||
case 'k':
|
||||
putenv("BLOCKSIZE=1K");
|
||||
break;
|
||||
case 'm':
|
||||
putenv("BLOCKSIZE=1M");
|
||||
break;
|
||||
case 'M':
|
||||
memf = optarg;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user