diff options
author | will <will@FreeBSD.org> | 2007-03-08 06:10:17 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2007-03-08 06:10:17 +0000 |
commit | 3483dab550cf625cb12e9b0c98e86757477d7a9c (patch) | |
tree | ba70d34350bf4f95883e2813bccdd9fae5a4543b /bin/df | |
parent | 0d9d66867bacf54f34eaaeef5843a6d2045f8d71 (diff) | |
download | FreeBSD-src-3483dab550cf625cb12e9b0c98e86757477d7a9c.zip FreeBSD-src-3483dab550cf625cb12e9b0c98e86757477d7a9c.tar.gz |
Fix a bug where the mutual exclusivity of the -l and -t options is not
recognized properly if -l is specified first.
PR: bin/105721
MFC after: 1 week
Diffstat (limited to 'bin/df')
-rw-r--r-- | bin/df/df.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index e33b3e4..9fdf14d 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -93,7 +93,7 @@ imax(int a, int b) return (a > b ? a : b); } -static int aflag = 0, cflag, hflag, iflag, kflag, nflag; +static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag; static struct ufs_args mdev; int @@ -159,6 +159,7 @@ main(int argc, char *argv[]) if (vfslist != NULL) errx(1, "-l and -t are mutually exclusive."); vfslist = makevfslist(makenetvfslist()); + lflag = 1; break; case 'm': putenv("BLOCKSIZE=1m"); @@ -168,6 +169,8 @@ main(int argc, char *argv[]) nflag = 1; break; case 't': + if (lflag) + errx(1, "-l and -t are mutually exclusive."); if (vfslist != NULL) errx(1, "only one -t option may be specified"); fstype = optarg; |