diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-11 21:25:23 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-14 17:38:40 +0100 |
commit | 4a80eb142a4df5e30b8045bb984ad9627b53acbd (patch) | |
tree | 518928a6d2c9a2239d04dbdf581a79b50c831dc9 | |
parent | 1574aff9424735b786a6c79b85728b0a7afbd05e (diff) | |
download | busybox-w32-4a80eb142a4df5e30b8045bb984ad9627b53acbd.tar.gz busybox-w32-4a80eb142a4df5e30b8045bb984ad9627b53acbd.tar.bz2 busybox-w32-4a80eb142a4df5e30b8045bb984ad9627b53acbd.zip |
cp: fix option handling in non-longopt config
the patch getopt32: remove opt_complementary 22542eca18e5807b72ddc78999f5101e33f17a53
introduced a regressed in the cp command since it removed all aliases of arguments
if long_opts is not configured.
Patch by Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | coreutils/cp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c index a76af7b7c..35ca5e007 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -100,7 +100,11 @@ int cp_main(int argc, char **argv) | |||
100 | "parents\0" No_argument "\xfe" | 100 | "parents\0" No_argument "\xfe" |
101 | ); | 101 | ); |
102 | #else | 102 | #else |
103 | flags = getopt32(argv, FILEUTILS_CP_OPTSTR); | 103 | flags = getopt32(argv, "^" |
104 | FILEUTILS_CP_OPTSTR | ||
105 | "\0" | ||
106 | "-2:l--s:s--l:Pd:rRd:Rd:apdR" | ||
107 | ); | ||
104 | #endif | 108 | #endif |
105 | /* Options of cp from GNU coreutils 6.10: | 109 | /* Options of cp from GNU coreutils 6.10: |
106 | * -a, --archive | 110 | * -a, --archive |