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

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Oct 7 12:56:31 CEST 2022


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



More information about the U-Boot mailing list