aboutsummaryrefslogtreecommitdiff
path: root/bin/cp
diff options
context:
space:
mode:
authorMichael Haro <mharo@FreeBSD.org>2000-01-23 03:04:49 +0000
committerMichael Haro <mharo@FreeBSD.org>2000-01-23 03:04:49 +0000
commit127432d7e28349f960632c326b333e0bc321402a (patch)
tree0737a66b10dbbfc95cfdac33e5ebb6968f5d2d44 /bin/cp
parent30bf72233e82eea28475cb8e810b81a9abf2434f (diff)
downloadsrc-127432d7e28349f960632c326b333e0bc321402a.tar.gz
src-127432d7e28349f960632c326b333e0bc321402a.zip
fix cp -vi bug
Submitted by: Dan Papasian (bugg_ on irc)
Notes
Notes: svn path=/head/; revision=56420
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 368886a22f3c..86ab3ab6c87c 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -50,6 +50,7 @@ static const char rcsid[] =
#include <fcntl.h>
#include <fts.h>
#include <stdio.h>
+#include <sysexits.h>
#include <unistd.h>
#include "extern.h"
@@ -93,7 +94,7 @@ copy_file(entp, dne)
if (checkch != 'y' && checkch != 'Y') {
(void)close(from_fd);
(void)fprintf(stderr, "not overwritten\n");
- return (0);
+ return (1);
}
}
@@ -324,5 +325,5 @@ usage()
(void)fprintf(stderr, "%s\n%s\n",
"usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target",
" cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory");
- exit(1);
+ exit(EX_USAGE);
}