From: Denys Vlasenko Date: Sun, 11 Feb 2018 20:25:23 +0000 (+0100) Subject: cp: fix option handling in non-longopt config X-Git-Tag: 1_29_0~244 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7f441403cbcb6cce864bae66e1fc7bb626954e04;p=oweals%2Fbusybox.git 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 Signed-off-by: Denys Vlasenko --- 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) "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