Update usage line and manpage for du(1)
Do not allow -a and -s to be specified at the same time.
This commit is contained in:
parent
ac3a5e0091
commit
ac130cbbe0
6
du.1
6
du.1
@ -3,7 +3,11 @@
|
||||
du \- display disk usage statistics
|
||||
.SH SYNOPSIS
|
||||
.B du
|
||||
.RB [ \-a ]
|
||||
.RB [ \-a
|
||||
.RB |
|
||||
.B \-s
|
||||
.RB ]
|
||||
.RB [ \-k ]
|
||||
.RI [ file ...]
|
||||
.SH DESCRIPTION
|
||||
.B du
|
||||
|
5
du.c
5
du.c
@ -23,7 +23,7 @@ static void print(long n, char *path);
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [-a] [file...]\n", argv0);
|
||||
eprintf("usage: %s [-a | -s] [-k] [file...]\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
@ -46,6 +46,9 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
} ARGEND;
|
||||
|
||||
if (aflag && sflag)
|
||||
usage();
|
||||
|
||||
bsize = getenv("BLOCKSIZE");
|
||||
if (bsize)
|
||||
blksize = estrtol(bsize, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user