cmd: exit: Doesn't function

Fabio Estevam festevam at gmail.com
Mon Jun 13 22:04:29 CEST 2022


[Adding Marek on Cc]

On Mon, Jun 13, 2022 at 5:00 PM Adrian Vovk <avovk at cc-sw.com> wrote:
>
> Hello,
>
> I've run into an issue trying to use a recent commit of u-boot
> (v2022.07-rc3-101-g90189ecd59) with some custom scripts. Basically, I've
> found that the `exit` command does not function whatsoever, and instead it
> just behaves as a no-op (like the `true` command)
>
> I tracked down the issue and found its source. It's 8c4e3b7[1], which
> changed the behavior of the exit command without changing the behavior of
> the command processor to match. The command line code expects exit to
> return values -2 and lower, which it will respond to by exiting[2].
> However, with that commit above, exit will never return a value <= -2,
> which means the command line loop never exits.
>
> I skimmed the mailing list and haven't found any mentions of this bug yet.
> I suspect this is because many of the deployments of u-boot are running
> older versions. However, exit is used rather often in the u-boot scripts
> I've seen, so I think this might become a major issue when board vendors
> start upgrading to newer versions of u-boot.
>
> [1]:
> https://source.denx.de/u-boot/u-boot/-/commit/8c4e3b79bd0bb76eea16869e9666e19047c0d005
> [2]:
> https://source.denx.de/u-boot/u-boot/-/blob/master/common/cli_hush.c#L1901-1904
>
> Thank you,
> Adrian Vovk


More information about the U-Boot mailing list