From owner-freebsd-bugs Sat Nov 28 12:09:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA09713 for freebsd-bugs-outgoing; Sat, 28 Nov 1998 12:09:24 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA09695 for ; Sat, 28 Nov 1998 12:09:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from Unknown UID 563@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id MAA03383; Sat, 28 Nov 1998 12:10:01 -0800 (PST) Received: from ibm.net. (slip166-72-224-176.pa.us.ibm.net [166.72.224.176]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA08968 for ; Sat, 28 Nov 1998 12:00:03 -0800 (PST) (envelope-from placej@ibm.net) Received: (from placej@localhost) by ibm.net. (8.8.8/8.8.8) id PAA00675; Sat, 28 Nov 1998 15:00:27 -0500 (EST) (envelope-from placej) Message-Id: <199811282000.PAA00675@ibm.net.> Date: Sat, 28 Nov 1998 15:00:27 -0500 (EST) From: jcplace@ibm.net Reply-To: jcplace@ibm.net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8880: cp missing verbose switch Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8880 >Category: bin >Synopsis: cp missing verbose switch >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 28 12:10:01 PST 1998 >Last-Modified: >Originator: John C. Place >Organization: >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: >Description: Something I miss is verbose option (-v) on cp,mv,rm to let me see what is hapening. >How-To-Repeat: >Fix: Small changes to cp.c and utils.c --- cp.org Wed Nov 25 04:08:44 1998 +++ cp.c Wed Nov 25 04:48:53 1998 @@ -86,7 +86,7 @@ PATH_T to = { to.p_path, "" }; uid_t myuid; -int Rflag, iflag, pflag, rflag, fflag; +int Rflag, iflag, pflag, rflag, vflag, fflag; int myumask; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -105,7 +105,7 @@ char *target; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRfipr")) != -1) + while ((ch = getopt(argc, argv, "HLPRfiprv")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -135,6 +135,9 @@ break; case 'r': rflag = 1; + break; + case 'v': + vflag = 1; break; default: usage(); --- utils.org Wed Nov 25 04:44:01 1998 +++ utils.c Sat Nov 28 10:03:40 1998 @@ -115,6 +115,10 @@ return (1);; } + if (vflag) { + (void)fprintf(stderr,"Copying %s to %s\n", entp->fts_path, to.p_path); + } + rval = 0; /* @@ -319,7 +323,7 @@ usage() { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i] [-p] src target", -" cp [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory"); +"usage: cp [-R [-H | -L | -P]] [-f | -i] [-p] [-v] src target", +" cp [-R [-H | -L | -P]] [-f | -i] [-p] [-v] src1 ... srcN directory"); exit(1); } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message