Created attachment 168442 [details] Fix output message which does not specify the exact situation. Overview: If type command "df -l -l", the output will be: df: -l and -t are mutually exclusive. Obviously, the output message does not tell the truth. I have created a patch which should fix this issue. Thanks.
Given the manual page description, I think I would instead just ignore the second lflag. Like so: --- 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());
A commit references this bug: Author: cem Date: Wed Aug 31 18:10:41 UTC 2016 New revision: 305139 URL: https://svnweb.freebsd.org/changeset/base/305139 Log: 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 Changes: head/bin/df/df.c
A commit references this bug: Author: eadler Date: Thu Mar 15 09:43:39 UTC 2018 New revision: 330982 URL: https://svnweb.freebsd.org/changeset/base/330982 Log: MFC r305139: 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 Changes: _U stable/11/ stable/11/bin/df/df.c