svn commit: r240791 - projects/mtree/contrib/mtree
Brooks Davis
brooks at FreeBSD.org
Fri Sep 21 20:30:59 UTC 2012
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 at 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));
More information about the svn-src-projects
mailing list