summaryrefslogtreecommitdiffstats
path: root/bin/cp/utils.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2013-01-23 02:06:20 +0000
committerobrien <obrien@FreeBSD.org>2013-01-23 02:06:20 +0000
commit3a199e38e16bd6901363a3ce0a86a68a40bd3e23 (patch)
tree7a6dde44fb0339aace2d247c7c554212a02606dc /bin/cp/utils.c
parentb9632eead54305628fbf36561d255b46deb10999 (diff)
downloadFreeBSD-src-3a199e38e16bd6901363a3ce0a86a68a40bd3e23.zip
FreeBSD-src-3a199e38e16bd6901363a3ce0a86a68a40bd3e23.tar.gz
Return "failure" as we do for 'cp -i' and a "n" answer.
Otherwise with '-v' we print out the file name as if it was copied: /tmp/2gb-card/M0132.CTG not overwritten /mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r--bin/cp/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index d729bd5..aa424f8 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -104,7 +104,7 @@ copy_file(const FTSENT *entp, int dne)
if (vflag)
printf("%s not overwritten\n", to.p_path);
(void)close(from_fd);
- return (0);
+ return (1);
} else if (iflag) {
(void)fprintf(stderr, "overwrite %s? %s",
to.p_path, YESNO);
OpenPOWER on IntegriCloud