From: Ron Yorston Date: Mon, 25 Dec 2017 20:36:05 +0000 (+0100) Subject: env: -u option fails due to typo X-Git-Tag: 1_28_0~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d8ee910f0a624fefd2a4aaefeb406003dea7807;p=oweals%2Fbusybox.git env: -u option fails due to typo The -u option is supposed to be allowed to appear multiple times; the option string supplied to getopt32long requires it to be followed by a nonnegative integer. Reported-by: Keith Maxwell Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- diff --git a/coreutils/env.c b/coreutils/env.c index 20453e871..0aebead1b 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -54,7 +54,7 @@ int env_main(int argc UNUSED_PARAM, char **argv) unsigned opts; llist_t *unset_env = NULL; - opts = getopt32long(argv, "+iu:+", + opts = getopt32long(argv, "+iu:*", "ignore-environment\0" No_argument "i" "unset\0" Required_argument "u" , &unset_env