"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Hugo Villeneuve and committed by
Stefan Roese
ee6d8ba1 dedef8f6

+3 -5
+3 -5
cmd/tlv_eeprom.c
··· 1033 1033 struct tlvinfo_header *eeprom_hdr = to_header(eeprom); 1034 1034 int devnum = 0; // TODO: support multiple EEPROMs 1035 1035 1036 - puts("EEPROM: "); 1037 - 1038 1036 if (read_eeprom(devnum, eeprom)) { 1039 - printf("Read failed.\n"); 1037 + log_err("EEPROM: read failed\n"); 1040 1038 return -1; 1041 1039 } 1042 1040 ··· 1082 1080 } 1083 1081 } 1084 1082 1085 - printf("%s v%u len=%u\n", eeprom_hdr->signature, eeprom_hdr->version, 1086 - be16_to_cpu(eeprom_hdr->totallen)); 1083 + log_debug("EEPROM: %s v%u len=%u\n", eeprom_hdr->signature, eeprom_hdr->version, 1084 + be16_to_cpu(eeprom_hdr->totallen)); 1087 1085 1088 1086 return 0; 1089 1087 }