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-11 21:25:23 +0100 |
commit | 7f441403cbcb6cce864bae66e1fc7bb626954e04 (patch) | |
tree | cb85ee7b6ad064bb3ba59d8f7292be6a925c71d9 /coreutils | |
parent | b5257a670196d3fee6b1307adce62c68bb3eb4fc (diff) | |
download | busybox-w32-7f441403cbcb6cce864bae66e1fc7bb626954e04.tar.gz busybox-w32-7f441403cbcb6cce864bae66e1fc7bb626954e04.tar.bz2 busybox-w32-7f441403cbcb6cce864bae66e1fc7bb626954e04.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>
Diffstat (limited to 'coreutils')
-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 8d93c6fe4..455bffbba 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -101,7 +101,11 @@ int cp_main(int argc, char **argv) | |||
101 | "parents\0" No_argument "\xfe" | 101 | "parents\0" No_argument "\xfe" |
102 | ); | 102 | ); |
103 | #else | 103 | #else |
104 | flags = getopt32(argv, FILEUTILS_CP_OPTSTR); | 104 | flags = getopt32(argv, "^" |
105 | FILEUTILS_CP_OPTSTR | ||
106 | "\0" | ||
107 | "-2:l--s:s--l:Pd:rRd:Rd:apdR" | ||
108 | ); | ||
105 | #endif | 109 | #endif |
106 | /* Options of cp from GNU coreutils 6.10: | 110 | /* Options of cp from GNU coreutils 6.10: |
107 | * -a, --archive | 111 | * -a, --archive |