Skip to content

Commit 430d4b8

Browse files
olivier-singlalguohan
authored andcommitted
decode-syseeprom : added new option to show the Product Name. (#496)
Added a new option -p to display the Product Name.
1 parent 09806b8 commit 430d4b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/decode-syseeprom

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def get_cmdline_opts():
7070
default=False, help="print eeprom from database")
7171
optcfg.add_option("-s", dest="serial", action="store_true",
7272
default=False, help="print device serial number/service tag")
73+
optcfg.add_option("-p", dest="modelstr", action="store_true", default=False,
74+
help="print the device product name")
7375
optcfg.add_option("-m", dest="mgmtmac", action="store_true", default=False,
7476
help="print the base mac address for management interfaces")
7577
optcfg.add_option("--init", dest="init", action="store_true", default=False,
@@ -138,6 +140,10 @@ def run(target, opts, args, support_eeprom_db):
138140
print e
139141
else:
140142
print serial or "Undefined."
143+
elif opts.modelstr:
144+
mm = target.modelstr(e)
145+
if mm != None:
146+
print mm
141147
else:
142148
target.decode_eeprom(e)
143149
(is_valid, valid_crc) = target.is_checksum_valid(e)

0 commit comments

Comments
 (0)