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:
sin 2013-10-17 11:21:15 +01:00
parent ac3a5e0091
commit ac130cbbe0
2 changed files with 9 additions and 2 deletions

6
du.1
View File

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

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