← Commit list

4766a2d56

Glenn L McGrath
Glenn L McGrath
2004-01-25
FAILED Duration: 68s

Subject

Add the -r option as a synonym of -R

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/cp.c+8 -1
@@ -41,7 +41,8 @@
#include "busybox.h"
#include "libcoreutils/coreutils.h"
-static const char cp_opts[] = "pdRfia"; /* WARNING!! ORDER IS IMPORTANT!! */
+/* WARNING!! ORDER IS IMPORTANT!! */
+static const char cp_opts[] = "pdRfiar";
extern int cp_main(int argc, char **argv)
{
@@ -66,6 +67,12 @@ extern int cp_main(int argc, char **argv)
if (flags & 32) {
flags |= (FILEUTILS_PRESERVE_STATUS | FILEUTILS_RECUR | FILEUTILS_DEREFERENCE);
}
+ if (flags & 64) {
+ /* Make -r a synonym for -R,
+ * -r was marked as obsolete in SUSv3, but is included for compatability
+ */
+ flags |= FILEUTILS_RECUR;
+ }
flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */