Author: obrien
Date: Wed Jan 23 02:06:20 2013
New Revision: 245832
URL: http://svnweb.freebsd.org/changeset/base/245832

Log:
  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

Modified:
  head/bin/cp/utils.c

Modified: head/bin/cp/utils.c
==============================================================================
--- head/bin/cp/utils.c Wed Jan 23 00:49:05 2013        (r245831)
+++ head/bin/cp/utils.c Wed Jan 23 02:06:20 2013        (r245832)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to