tlv_eeprom: suppress success log messages
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Wed, 5 Nov 2025 16:32:48 +0000 (11:32 -0500)
committerHugo Villeneuve <hvilleneuve@dimonoff.com>
Mon, 17 Nov 2025 15:36:11 +0000 (10:36 -0500)
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
src/tlv_eeprom.c

index 6a4c46c..904c6bb 100644 (file)
@@ -173,8 +173,10 @@ void show_eeprom(int devnum, u8 *eeprom)
                curr_tlv += ENT_SIZE + eeprom_tlv->length;
        }
 
-       printf("Checksum is %s.\n",
-              is_checksum_valid(eeprom) ? "valid" : "invalid");
+       if (!is_checksum_valid(eeprom)) {
+               printf("Invalid checksum\n");
+               return;
+       }
 
 #ifdef DEBUG
        printf("EEPROM dump: (0x%x bytes)", TLV_INFO_MAX_LEN);
@@ -376,7 +378,6 @@ int prog_eeprom(int devnum, u8 *eeprom)
                return -1;
        }
 
-       printf("Programming passed.\n");
        return 0;
 }