summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2025-06-18 09:25:37 -0400
committerStefan Roese <stefan.roese@mailbox.org>2025-07-29 08:44:18 +0200
commitee6d8ba15ea6a249ca59d97f3d645db4428ce11e (patch)
tree1ba05e8690ba9cbb46319580694cf65093f4e0b5 /cmd
parentdedef8f6f9fa97c8d0639cbd6aae51b5c2d3c803 (diff)
cmd: tlv_eeprom: improve mac_read_from_eeprom() log messages
mac_read_from_eeprom() always display debug infos, and this messes up the display of the "Net:" section details: Before: Net: EEPROM: TlvInfo v1 len=172 eth0: ethernet@11c20000 After: Net: eth0: ethernet@11c20000 Fix by moving unconditional "EEPROM: " header into each message and changing debug message to use log_debug(). Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tlv_eeprom.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 89546cef16f..3127660dd9e 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -1033,10 +1033,8 @@ int mac_read_from_eeprom(void)
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
int devnum = 0; // TODO: support multiple EEPROMs
- puts("EEPROM: ");
-
if (read_eeprom(devnum, eeprom)) {
- printf("Read failed.\n");
+ log_err("EEPROM: read failed\n");
return -1;
}
@@ -1082,8 +1080,8 @@ int mac_read_from_eeprom(void)
}
}
- printf("%s v%u len=%u\n", eeprom_hdr->signature, eeprom_hdr->version,
- be16_to_cpu(eeprom_hdr->totallen));
+ log_debug("EEPROM: %s v%u len=%u\n", eeprom_hdr->signature, eeprom_hdr->version,
+ be16_to_cpu(eeprom_hdr->totallen));
return 0;
}