Subject: diff -u of src/bin/cp/
To: None <tech-userlevel@netbsd.org>
From: Jason R. Fink <jrf@adresearch.com>
List: tech-userlevel
Date: 12/12/2002 12:34:58
--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Attached is a cvs diff -u of the contents of 
src/bin/cp

	j
-- 
Jay Fink http://pyxis.homeunix.net/
NetBSD Developer http://www.netbsd.org/
Senior SysAdmin/Programmer, Ipsos http://www.ipsos.com/

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cp.diff"

? cp.diff
Index: cp.1
===================================================================
RCS file: /cvsroot/basesrc/bin/cp/cp.1,v
retrieving revision 1.19
diff -u -r1.19 cp.1
--- cp.1	2002/02/08 01:21:55	1.19
+++ cp.1	2002/12/12 17:32:55
@@ -139,6 +139,10 @@
 and either the user ID or group ID cannot be preserved, neither
 the set user ID or set group ID bits are preserved in the copy's
 permissions.
+.It Fl v  
+Cause
+.Nm 
+to be verbose, showing files as they are copied.
 .El
 .Pp
 For each destination file that already exists, its contents are
Index: cp.c
===================================================================
RCS file: /cvsroot/basesrc/bin/cp/cp.c,v
retrieving revision 1.31
diff -u -r1.31 cp.c
--- cp.c	2001/09/13 09:53:59	1.31
+++ cp.c	2002/12/12 17:32:56
@@ -88,7 +88,7 @@
 PATH_T to = { to.p_path, "" };
 
 uid_t myuid;
-int Rflag, fflag, iflag, pflag, rflag; 
+int Rflag, fflag, iflag, pflag, rflag, vflag; 
 mode_t myumask;
 
 enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
@@ -139,6 +139,9 @@
 		case 'r':
 			rflag = 1;
 			break;
+		case 'v':
+			vflag = 1;
+			break;
 		case '?':
 		default:
 			usage();
@@ -452,6 +455,8 @@
 				rval = 1;
 			break;
 		}
+		if (vflag)
+			(void)printf("%s -> %s\n", curr->fts_path, to.p_path);
 	}
 	if (errno)
 		err(1, "fts_read");
Index: utils.c
===================================================================
RCS file: /cvsroot/basesrc/bin/cp/utils.c,v
retrieving revision 1.21
diff -u -r1.21 utils.c
--- utils.c	2002/10/19 20:33:17	1.21
+++ utils.c	2002/12/12 17:32:56
@@ -330,8 +330,8 @@
 usage(void)
 {
 	(void)fprintf(stderr,
-	    "usage: %s [-R [-H | -L | -P]] [-f | -i] [-p] src target\n"
-	    "       %s [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory\n",
+	    "usage: %s [-R [-H | -L | -P]] [-f | -i] [-pv] src target\n"
+	    "       %s [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory\n",
 	    getprogname(), getprogname());
 	exit(1);
 	/* NOTREACHED */

--zhXaljGHf11kAtnf--