From 6ac44ae1f9a5758350f78fe21d2c9686e3fdeef0 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Mon, 29 May 2006 06:25:07 +0000 Subject: 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@ --- usr.bin/cvs/add.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'usr.bin') 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 * @@ -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); } -- cgit v1.2.3