[git commit branch/1_28_stable] cp: fix option handling in non-longopt config
Denys Vlasenko
vda.linux at googlemail.com
Wed Feb 14 16:38:40 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=4a80eb142a4df5e30b8045bb984ad9627b53acbd
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_28_stable
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 at dd-wrt.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
coreutils/cp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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)
"parents\0" No_argument "\xfe"
);
#else
- flags = getopt32(argv, FILEUTILS_CP_OPTSTR);
+ flags = getopt32(argv, "^"
+ FILEUTILS_CP_OPTSTR
+ "\0"
+ "-2:l--s:s--l:Pd:rRd:Rd:apdR"
+ );
#endif
/* Options of cp from GNU coreutils 6.10:
* -a, --archive
More information about the busybox-cvs
mailing list