[PATCH 1/1] efi_loader: printf code n efi_disk_get_device_name()

Ilias Apalodimas ilias.apalodimas at linaro.org
Fri Oct 7 15:26:20 CEST 2022


On Fri, 7 Oct 2022 at 13:56, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> part is unsigned. So it must be printed with %u.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  lib/efi_loader/efi_disk.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> index 3b4ac27b76..0c6d35874f 100644
> --- a/lib/efi_loader/efi_disk.c
> +++ b/lib/efi_loader/efi_disk.c
> @@ -842,7 +842,8 @@ efi_status_t efi_disk_get_device_name(const efi_handle_t handle, char *buf, int
>         if (is_partition) {
>                 part_data = dev_get_uclass_plat(dev);
>                 part = part_data->partnum;
> -               count = snprintf(buf, size, "%s %d:%d", if_typename, diskid, part);
> +               count = snprintf(buf, size, "%s %d:%u", if_typename, diskid,
> +                                part);
>         } else {
>                 count = snprintf(buf, size, "%s %d", if_typename, diskid);
>         }
> --
> 2.37.2
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list