aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/du
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-11-08 11:36:46 +0000
committerEd Schouten <ed@FreeBSD.org>2011-11-08 11:36:46 +0000
commit66c5875a459b69dad849b7ed7922edd34a4843d4 (patch)
tree2e4e166ef147029cdd9df2cf07f8e69f4333f102 /usr.bin/du
parented1f6dc2357a638c9cb09daaf750f727ebef03a8 (diff)
Notes
Diffstat (limited to 'usr.bin/du')
-rw-r--r--usr.bin/du/du.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index 86d8863b595c..5c670d45eeac 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -88,7 +88,6 @@ main(int argc, char *argv[])
off_t savednumber, curblocks;
off_t threshold, threshold_sign;
int ftsoptions;
- int listall;
int depth;
int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag;
int hflag, lflag, ch, notused, rval;
@@ -229,17 +228,10 @@ main(int argc, char *argv[])
if (!Aflag && (cblocksize % DEV_BSIZE) != 0)
cblocksize = howmany(cblocksize, DEV_BSIZE) * DEV_BSIZE;
- listall = 0;
-
- if (aflag) {
- if (sflag || dflag)
- usage();
- listall = 1;
- } else if (sflag) {
- if (dflag)
- usage();
+ if (aflag + dflag + sflag > 1)
+ usage();
+ if (sflag)
depth = 0;
- }
if (!*argv) {
argv = save;
@@ -320,7 +312,7 @@ main(int argc, char *argv[])
howmany(p->fts_statp->st_size, cblocksize) :
howmany(p->fts_statp->st_blocks, cblocksize);
- if (listall || p->fts_level == 0) {
+ if (aflag || p->fts_level == 0) {
if (hflag) {
prthumanval(curblocks);
(void)printf("\t%s\n", p->fts_path);