cvs commit: src/bin/cp utils.c

Jun Kuriyama kuriyama at imgsrc.co.jp
Sun Jun 29 18:29:47 PDT 2003


At Sun, 22 Jun 2003 00:02:17 -0700 (PDT),
John-Mark Gurney wrote:
>   also fix a slight bogon that assumed an fd of 0 was not valid.  Changed
>   it to be -1.

It seems this modification should be applied to setfile() call in
cp.c, too.


Index: cp.c
===================================================================
RCS file: /home/ncvs/src/bin/cp/cp.c,v
retrieving revision 1.48
diff -u -r1.48 cp.c
--- cp.c	1 May 2003 16:58:54 -0000	1.48
+++ cp.c	30 Jun 2003 01:26:28 -0000
@@ -366,7 +366,7 @@
 			 * normally want to preserve them on directories.
 			 */
 			if (pflag) {
-				if (setfile(curr->fts_statp, 0))
+				if (setfile(curr->fts_statp, -1))
 				    rval = 1;
 			} else {
 				mode = curr->fts_statp->st_mode;


-- 
Jun Kuriyama <kuriyama at imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama at FreeBSD.org> // FreeBSD Project


More information about the cvs-all mailing list