From 246ef54f1560932d0f7ef10a89cab3a521a1c8c2 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 31 Aug 2016 18:10:41 +0000 Subject: [PATCH] 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 --- bin/df/df.c | 3 +++ 1 file changed, 3 insertions(+) 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());