From owner-freebsd-bugs Fri Feb 8 19:50:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B92CB37B41B for ; Fri, 8 Feb 2002 19:50:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g193o0M34016; Fri, 8 Feb 2002 19:50:00 -0800 (PST) (envelope-from gnats) Received: from cs6668125-184.austin.rr.com (cs6668125-184.austin.rr.com [66.68.125.184]) by hub.freebsd.org (Postfix) with ESMTP id 4C45A37B400 for ; Fri, 8 Feb 2002 19:44:05 -0800 (PST) Received: (from fracture@localhost) by cs6668125-184.austin.rr.com (8.11.6/8.11.6) id g193lXd55117; Fri, 8 Feb 2002 21:47:33 -0600 (CST) (envelope-from fracture) Message-Id: <200202090347.g193lXd55117@cs6668125-184.austin.rr.com> Date: Fri, 8 Feb 2002 21:47:33 -0600 (CST) From: Jordan DeLong To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/34744: Add -a (same as -PpR) flag to cp(1) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34744 >Category: bin >Synopsis: Add -a (same as -PpR) flag to cp(1) >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: Fri Feb 08 19:50:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Jordan DeLong >Release: FreeBSD 4.5-RELEASE i386 >Organization: >Environment: System: FreeBSD cs6668125-184 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Wed Jan 30 22:37:07 CST 2002 fracture@cs6668125-184:/usr/obj/usr/src/sys/HOBOIV i386 >Description: some other cp(1) implementations (such as GNU cp) provide a -a flag, which just means -PpR. somewhat useful. >How-To-Repeat: the diff is against the 4.5-RELEASE cp(1) source. >Fix: diff -ruN cp.dist/cp.1 cp/cp.1 --- cp.dist/cp.1 Thu Aug 16 05:01:03 2001 +++ cp/cp.1 Fri Feb 8 21:44:40 2002 @@ -77,6 +77,13 @@ .Pp The following options are available: .Bl -tag -width flag +.It Fl a +Same as specifying the +.Fl R +.Fl P +and +.Fl p +flags. .It Fl H If the .Fl R @@ -226,7 +233,9 @@ .Pp The .Fl v -option is non-standard and its use in scripts is not recommended. +and +.Fl a +options are non-standard and use in scripts is not recommended. .Sh SEE ALSO .Xr mv 1 , .Xr rcp 1 , diff -ruN cp.dist/cp.c cp/cp.c --- cp.dist/cp.c Wed Jan 30 09:15:46 2002 +++ cp/cp.c Fri Feb 8 21:43:28 2002 @@ -102,7 +102,7 @@ char *target; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRfiprv")) != -1) + while ((ch = getopt(argc, argv, "aHLPRfiprv")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -112,6 +112,10 @@ Lflag = 1; Hflag = Pflag = 0; break; + case 'a': + Rflag = 1; + pflag = 1; + /* FALLTHROUGH */ case 'P': Pflag = 1; Hflag = Lflag = 0; diff -ruN cp.dist/utils.c cp/utils.c --- cp.dist/utils.c Wed Jan 30 09:15:46 2002 +++ cp/utils.c Fri Feb 8 21:39:05 2002 @@ -312,7 +312,7 @@ { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target", -" cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory"); +"usage: cp [-R [-H | -L | -P]] [-f | -i] [-apv] src target", +" cp [-R [-H | -L | -P]] [-f | -i] [-apv] src1 ... srcN directory"); exit(EX_USAGE); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message