Skip to contentSkip to conversation

disk/part_dos.c: Make use of LBAF for printing lbaint_t

PATCH In review Tom Rini 1 participant 2 messages Jul 2, 2025 – Jul 10, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 disk/part_dos.c: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.

---
 disk/part_dos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disk/part_dos.c +1 -1
index 5c77225cef93..18dd35c9b98e 100644
@@ -421,7 +421,7 @@ int write_mbr_partitions(struct blk_desc *dev,
 
 		/* write EBR */
 		if (blk_dwrite(dev, ext_part_sect, 1, buffer) != 1) {
-			printf("%s: failed writing 'EBR' (1 blks at 0x%lx)\n",
+			printf("%s: failed writing 'EBR' (1 blks at 0x" LBAF ")\n",
 			       __func__, ext_part_sect);
 			return -1;
 		}
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 5 lines · Tom Rini

When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.

Applied to u-boot/master, thanks!

[1/1] disk/part_dos.c: Make use of LBAF for printing lbaint_t

      commit: 9cede1930b40673c2d86d036b98acf01198f06aa
Signature · 1 line
Tom