summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-05-29 06:25:07 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-05-29 06:25:07 +0000
commit6ac44ae1f9a5758350f78fe21d2c9686e3fdeef0 (patch)
tree3d819f28c22f936d321850d2708034c964bcd49f /usr.bin
parent0588dc5f98bce1488ae1375d53151c6c03444b00 (diff)
add needs to be passed arguments on the command line, and
isnt supposed to just run over our parent directory if none are specified. found by reyk@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/add.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c
index ea9d88cd359..927536386df 100644
--- a/usr.bin/cvs/add.c
+++ b/usr.bin/cvs/add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: add.c,v 1.45 2006/05/28 17:26:12 joris Exp $ */
+/* $OpenBSD: add.c,v 1.46 2006/05/29 06:25:06 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -45,7 +45,6 @@ cvs_add(int argc, char **argv)
{
int ch;
int flags;
- char *arg = ".";
struct cvs_recursion cr;
flags = CR_REPO;
@@ -63,17 +62,16 @@ cvs_add(int argc, char **argv)
argc -= optind;
argv += optind;
+ if (argc == 0)
+ fatal("%s", cvs_cmd_add.cmd_synopsis);
+
cr.enterdir = NULL;
cr.leavedir = NULL;
cr.local = cvs_add_local;
cr.remote = NULL;
cr.flags = flags;
- if (argc > 0)
- cvs_file_run(argc, argv, &cr);
- else
- cvs_file_run(1, &arg, &cr);
-
+ cvs_file_run(argc, argv, &cr);
return (0);
}