summaryrefslogtreecommitdiffstats
path: root/usr.bin/xinstall
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-05-30 07:08:49 +0000
committerru <ru@FreeBSD.org>2001-05-30 07:08:49 +0000
commit28c43881ca67d5a898bed36f9019ffbc56fc50ae (patch)
tree02d11a26e2e63754c1a67d57c68629f4c10bf4fa /usr.bin/xinstall
parentdcf9290c968d85cd6bc1f7f4bc6bf684e0589cfc (diff)
downloadFreeBSD-src-28c43881ca67d5a898bed36f9019ffbc56fc50ae.zip
FreeBSD-src-28c43881ca67d5a898bed36f9019ffbc56fc50ae.tar.gz
Backout rev. 1.42 (relaxing the check for -d plus other flags).
Instead, issue a warning for now if -d and -C options are used together. This will be turned into an error before 4.5-RELEASE. Reviewed by: imp
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r--usr.bin/xinstall/xinstall.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index bf103d4..55d59cc 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -169,9 +169,16 @@ main(argc, argv)
argv += optind;
/* some options make no sense when creating directories */
- if (dostrip && dodir)
+ if ((safecopy || dostrip) && dodir)
usage();
+ /*
+ * Older versions allowed -d -C combo. Issue a warning
+ * for now, but turn this into an error before 4.5-RELEASE.
+ */
+ if (docompare && dodir)
+ warnx("the -d and -C options may not be specified together");
+
/* must have at least two arguments, except when creating directories */
if (argc < 2 && !dodir)
usage();
OpenPOWER on IntegriCloud