From 670a01d488cd426b06ef3810ef072b61f698dfba Mon Sep 17 00:00:00 2001 From: wollman Date: Wed, 10 Aug 1994 19:21:07 +0000 Subject: Gimme back my `-k' option! Also document `-t' option in the usage message. --- bin/df/df.1 | 7 ++++++- bin/df/df.c | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'bin/df') diff --git a/bin/df/df.1 b/bin/df/df.1 index bf461d6..835ff23 100644 --- a/bin/df/df.1 +++ b/bin/df/df.1 @@ -39,7 +39,7 @@ .Nd display free disk space .Sh SYNOPSIS .Nm df -.Op Fl in +.Op Fl ink .Op Fl t Ar type .Op Ar file | Ar filesystem ... .Sh DESCRIPTION @@ -60,6 +60,11 @@ The following options are available: .Bl -tag -width Ds .It Fl i Include statistics on the number of free inodes. +.It Fl k +Use 1024-byte (1-Kbyte) blocks rather than the default. Note that +this overrides the +.Ev BLOCKSIZE +specification from the environment. .It Fl n Print out the previously obtained statistics from the filesystems. This option should be used if it is possible that one or more diff --git a/bin/df/df.c b/bin/df/df.c index eb6ee81..02e6ca9 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -121,11 +121,14 @@ main(argc, argv) int ch, err, i, maxwidth, width; char *mntpt; - while ((ch = getopt(argc, argv, "int:")) != EOF) + while ((ch = getopt(argc, argv, "iknt:")) != EOF) switch (ch) { case 'i': iflag = 1; break; + case 'k': + putenv("BLOCKSIZE=1024"); + break; case 'n': nflag = 1; break; @@ -415,6 +418,7 @@ bread(off, buf, cnt) void usage() { - (void)fprintf(stderr, "usage: df [-in] [file | file_system ...]\n"); + fprintf(stderr, + "usage: df [-ikn] [-t fstype] [file | file_system ...]\n"); exit(1); } -- cgit v1.1