summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2006-11-06 11:12:56 +0000
committerxsa <xsa@openbsd.org>2006-11-06 11:12:56 +0000
commit44660a68c1af672119616a63d3bb3985df77ea88 (patch)
tree4d3a15968bf321819ad5287b8306832544611f05
parentDon't advertise USB wi adapters as supported hostap devices, (diff)
downloadwireguard-openbsd-44660a68c1af672119616a63d3bb3985df77ea88.tar.xz
wireguard-openbsd-44660a68c1af672119616a63d3bb3985df77ea88.zip
- handle global -n flag in conjunction with remove -f.
- better error message.
-rw-r--r--usr.bin/cvs/remove.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index af7f68ca688..a87bd8a9267 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.55 2006/10/31 15:23:40 xsa Exp $ */
+/* $OpenBSD: remove.c,v 1.56 2006/11/06 11:12:56 xsa Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -95,8 +95,9 @@ cvs_remove(int argc, char **argv)
cvs_client_get_responses();
} else {
if (existing != 0) {
- cvs_log(LP_ERR, "%d file(s) exist, remove them first",
- existing);
+ cvs_log(LP_ERR, (existing == 1) ?
+ "%d file exists; remove it first" :
+ "%d files exist; remove them first", existing);
}
if (removed != 0) {
@@ -136,7 +137,7 @@ cvs_remove_local(struct cvs_file *cf)
return;
}
- if (force_remove == 1) {
+ if (force_remove == 1 && cvs_noexec == 0) {
if (unlink(cf->file_path) == -1)
fatal("cvs_remove_local: %s", strerror(errno));
(void)close(cf->fd);