[PATCH 1/1] boot: fix bootdev_list()

Simon Glass sjg at chromium.org
Wed Aug 2 20:07:42 CEST 2023


Hi Heinrich,

On Sun, 30 Jul 2023 at 08:29, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> uclass_get_device_by_name() is meant to return 0 or a negative error code.
> simple_itoa() cannot handle negative numbers.
>
> This leads to output like:
>
>     => bootdev list -p
>
>     Seq  Probed  Status  Uclass    Name
>     ---  ------  ------  --------  ------------------
>       c   [   ]  18446744073709551614  spi_flash spi.bin at 0.bootdev
>
> Convert the status to a positive number. Now we get
>
>     Seq  Probed  Status  Uclass    Name
>     ---  ------  ------  --------  ------------------
>       c   [   ]       2  spi_flash spi.bin at 0.bootdev
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  boot/bootdev-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list