sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit ac130cbbe04f0c16c8c7ca64844645421598ce91
parent ac3a5e0091c74d9ae4e19d3dc8fac83a1b91caf0
Author: sin <sin@2f30.org>
Date:   Thu, 17 Oct 2013 11:21:15 +0100

Update usage line and manpage for du(1)

Do not allow -a and -s to be specified at the same time.

Diffstat:
Mdu.1 | 6+++++-
Mdu.c | 5++++-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/du.1 b/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 diff --git a/du.c b/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);