Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2012 20:30:59 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r240791 - projects/mtree/contrib/mtree
Message-ID:  <201209212030.q8LKUxdY002390@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Sep 21 20:30:59 2012
New Revision: 240791
URL: http://svn.freebsd.org/changeset/base/240791

Log:
  Don't allow "-f spec1 -f spec2" with -c, -C, -D, or -p.
  
  Obtained from:	Julian Fagir <gnrp@komkon2.de>

Modified:
  projects/mtree/contrib/mtree/mtree.c

Modified: projects/mtree/contrib/mtree/mtree.c
==============================================================================
--- projects/mtree/contrib/mtree/mtree.c	Fri Sep 21 20:14:27 2012	(r240790)
+++ projects/mtree/contrib/mtree/mtree.c	Fri Sep 21 20:30:59 2012	(r240791)
@@ -223,6 +223,13 @@ main(int argc, char **argv)
 	if (argc)
 		usage();
 
+	if (spec2 && (cflag || Cflag || Dflag))
+		mtree_err("Double -f, -c, -C and -D flags are mutually "
+		    "exclusive");
+
+	if (dir && spec2)
+		mtree_err("Double -f and -p flags are mutually exclusive");
+
 	if (dir && chdir(dir))
 		mtree_err("%s: %s", dir, strerror(errno));
 



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