summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2020-04-07 09:40:09 +0000
committerespie <espie@openbsd.org>2020-04-07 09:40:09 +0000
commitea4b5b12cf8f47b1fb527fd2491d58fc3e15f98c (patch)
tree6663f36d878fdda5b89a2d0a6183992155978f6a
parentKill unused extern declaration. (diff)
downloadwireguard-openbsd-ea4b5b12cf8f47b1fb527fd2491d58fc3e15f98c.tar.xz
wireguard-openbsd-ea4b5b12cf8f47b1fb527fd2491d58fc3e15f98c.zip
install -d should error out if no directory is given
(this would have prevented a recent typo in bsd.port.mk from going in) as discussed with theo, merge the check that's in FreeBSD
-rw-r--r--usr.bin/xinstall/xinstall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index 0c7b8e10f25..b20ec4c7cfc 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xinstall.c,v 1.73 2019/06/28 13:35:05 deraadt Exp $ */
+/* $OpenBSD: xinstall.c,v 1.74 2020/04/07 09:40:09 espie Exp $ */
/* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */
/*
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
usage();
/* must have at least two arguments, except when creating directories */
- if (argc < 2 && !dodir)
+ if (argc == 0 || (argc == 1 && !dodir))
usage();
/* get group and owner id's */