aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2016-08-31 18:10:41 +0000
committerConrad Meyer <cem@FreeBSD.org>2016-08-31 18:10:41 +0000
commit246ef54f1560932d0f7ef10a89cab3a521a1c8c2 (patch)
tree86bca382120a7dd393820953e9c95804c539f99d /bin
parent61bd7ae0ecbaeb41faaab7280703af2ac2af7e9a (diff)
downloadsrc-246ef54f1560932d0f7ef10a89cab3a521a1c8c2.tar.gz
src-246ef54f1560932d0f7ef10a89cab3a521a1c8c2.zip
df(1): Allow duplicate -l flags gracefully
Rather than producing a misleading error message when duplicate -l flags are provided to df(1), simply ignore extra flags and proceed as if only one was specified. This seems most reasonable given the usage for -l: -l Only display information about locally-mounted file systems. l and t flags still conflict, as before. PR: 208169 Reported by: by at reorigin.com Reviewed by: allanjude
Notes
Notes: svn path=/head/; revision=305139
Diffstat (limited to 'bin')
-rw-r--r--bin/df/df.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/df/df.c b/bin/df/df.c
index f8d43bf95f59..1bcf40d21118 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -166,6 +166,9 @@ main(int argc, char *argv[])
hflag = 0;
break;
case 'l':
+ /* Ignore duplicate -l */
+ if (lflag)
+ break;
if (vfslist != NULL)
xo_errx(1, "-l and -t are mutually exclusive.");
vfslist = makevfslist(makenetvfslist());