[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] ash: fix build failure when command built-in is disabled
From: Harald van Dijk <harald () gigawatt ! nl>
Date: 2020-02-27 9:12:58
Message-ID: 7bab1f5d-247d-ba17-3ae4-6d4506fd253a () gigawatt ! nl
[Download RAW message or body]
On 27/02/2020 08:40, Ron Yorston wrote:
> @@ -8692,6 +8691,7 @@ fill_arglist(struct arglist *arglist, union node **argpp)
> return *lastp;
> }
>
> +#if ENABLE_ASH_CMDCMD
> /* Is it "command [-p] PROG ARGS" bltin, no other opts? Return ptr to "PROG" if yes */
> static int
> parse_command_args(struct arglist *arglist, union node **argpp, const char **path)
> @@ -10190,12 +10190,14 @@ evalcommand(union node *cmd, int flags)
> vlocal = !spclbltin;
> }
> cmd_is_exec = cmdentry.u.cmd == EXECCMD;
> +#if ENABLE_ASH_CMDCMD
> if (cmdentry.u.cmd != COMMANDCMD)
> break;
>
> cmd_flag = parse_command_args(&arglist, &argp, &path);
> if (!cmd_flag)
> break;
> +#endif
There needs to be a break statement when !ENABLE_ASH_CMDCMD, whether by
moving the #endif up one line or adding an #else. Without that, you get
an infinite loop as seen with e.g. ash -c true.
Cheers,
Harald van Dijk
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic