[PATCH] cmd/eeprom.c: prepend 0x to hex numbers in output message format

Rasmus Villemoes rasmus.villemoes at prevas.dk
Wed Dec 11 12:18:29 CET 2019


From: "Klaus H. Sorensen" <khso at prevas.dk>

If the numbers do not happen to contain any digits from [a-f], it's
not clear that they are base 16.

Signed-off-by: Klaus H. Sorensen <khso at prevas.dk>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
---
 cmd/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 19953df082..23d9a21ab6 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -307,7 +307,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus,
 {
 	int rcode = 0;
 	const char *const fmt =
-		"\nEEPROM @0x%lX %s: addr %08lx  off %04lx  count %ld ... ";
+		"\nEEPROM @0x%lX %s: addr 0x%08lx  off 0x%04lx  count %ld ... ";
 #ifdef CONFIG_CMD_EEPROM_LAYOUT
 	struct eeprom_layout layout;
 #endif
-- 
2.23.0



More information about the U-Boot mailing list