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
|
du \- display disk usage statistics
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B du
|
.B du
|
||||||
.RB [ \-a ]
|
.RB [ \-a
|
||||||
|
.RB |
|
||||||
|
.B \-s
|
||||||
|
.RB ]
|
||||||
|
.RB [ \-k ]
|
||||||
.RI [ file ...]
|
.RI [ file ...]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B du
|
.B du
|
||||||
|
|
5
du.c
5
du.c
|
@ -23,7 +23,7 @@ static void print(long n, char *path);
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-a] [file...]\n", argv0);
|
eprintf("usage: %s [-a | -s] [-k] [file...]\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -46,6 +46,9 @@ main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
} ARGEND;
|
} ARGEND;
|
||||||
|
|
||||||
|
if (aflag && sflag)
|
||||||
|
usage();
|
||||||
|
|
||||||
bsize = getenv("BLOCKSIZE");
|
bsize = getenv("BLOCKSIZE");
|
||||||
if (bsize)
|
if (bsize)
|
||||||
blksize = estrtol(bsize, 0);
|
blksize = estrtol(bsize, 0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user