]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: printf code in efi_disk_get_device_name()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 7 Oct 2022 10:55:16 +0000 (12:55 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 10 Oct 2022 14:34:25 +0000 (16:34 +0200)
part is unsigned. So it must be printed with %u.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_disk.c

index e6a356b5897f31d59046b05707e2a5b55b762b4b..a2095050fdf5e78de502d10eefd037daa98795f0 100644 (file)
@@ -786,7 +786,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);
        }