projects
/
mtlv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d28f54c
)
tlv_eeprom: do not start over with default contents if invalid
author
Hugo Villeneuve
<hvilleneuve@dimonoff.com>
Wed, 5 Nov 2025 17:18:23 +0000
(12:18 -0500)
committer
Hugo 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
patch
|
blob
|
history
diff --git
a/src/tlv_eeprom.c
b/src/tlv_eeprom.c
index
967e6dd
..
0b1dbc2
100644
(file)
--- a/
src/tlv_eeprom.c
+++ b/
src/tlv_eeprom.c
@@
-119,15
+119,6
@@
int read_eeprom(int devnum, u8 *eeprom)
else if (ret == -ENODEV)
return ret;
- // If the contents are invalid, start over with default contents
- if (!is_valid_tlvinfo_header(eeprom_hdr) ||
- !is_checksum_valid(eeprom)) {
- strcpy(eeprom_hdr->signature, TLV_INFO_ID_STRING);
- eeprom_hdr->version = TLV_INFO_VERSION;
- eeprom_hdr->totallen = cpu_to_be16(0);
- update_crc(eeprom);
- }
-
return ret;
}