Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2018 09:43:39 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330982 - stable/11/bin/df
Message-ID:  <201803150943.w2F9hdPX070636@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Mar 15 09:43:38 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

Modified:
  stable/11/bin/df/df.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/df/df.c
==============================================================================
--- stable/11/bin/df/df.c	Thu Mar 15 09:38:18 2018	(r330981)
+++ stable/11/bin/df/df.c	Thu Mar 15 09:43:38 2018	(r330982)
@@ -193,6 +193,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());



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803150943.w2F9hdPX070636>