Commit ba45dddd authored by Pieter Van Trappen's avatar Pieter Van Trappen

fmceeprom - limit EEPROM data print to used memory; add note about data validity…

fmceeprom - limit EEPROM data print to used memory; add note about data validity check needed but would require libipmi additions
parent a7493238
......@@ -29,7 +29,9 @@ def parse_cmd():
args.handler(args)
def main(main_args):
# Constants
PRODUCT = "FmcDio10i8o"
MEMLEN = 216 # hardcoded cause libipmi has no get_size() or similar
#==================================================
# Calculate number of minutes since 0:00 1/1/96
......@@ -109,7 +111,8 @@ def main(main_args):
f_eeprom = open(eeprom_fn, "rb")
eeprom_data = []
byte = f_eeprom.read(1) # reads one byte
while byte:
for i in range(MEMLEN):
eeprom_data.append(ord(byte))
byte = f_eeprom.read(1) # reads one byte
f_eeprom.close()
......@@ -125,5 +128,7 @@ def main(main_args):
if i%8 == 0:
print("")
print("\nTODO: check data validity - use hd for now")
if __name__ == '__main__' :
parse_cmd()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment