[PATCH] env: -u option fails due to typo
Keith Maxwell
keith.maxwell at gmail.com
Fri Dec 8 00:01:54 UTC 2017
Great thanks Ron!
I can confirm that applying a similar patch to 1.27.2 gives the
expected behaviour:
$ ./src/build-dynamic/busybox env -u MANPAGER pwd
/home/chronos/aports-3.7.0/main/busybox
Thanks again for your assistance.
Kind Regards
Keith Maxwell
On 7 December 2017 at 13:38, Ron Yorston <rmy at pobox.com> wrote:
> 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>
> ---
> coreutils/env.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> --
> 2.14.3
>
More information about the busybox
mailing list