[git commit] env: -u option fails due to typo

Denys Vlasenko vda.linux at googlemail.com
Mon Dec 25 20:36:05 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=8d8ee910f0a624fefd2a4aaefeb406003dea7807
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

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 <keith.maxwell at gmail.com>
Signed-off-by: Ron Yorston <rmy at pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coreutils/env.c b/coreutils/env.c
index 20453e8..0aebead 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


More information about the busybox-cvs mailing list