DellEMC Z9332f: Platform API - Remove EEPROM Vendor Extension decoding (#8716)

This commit is contained in:
Arun Saravanan Balachandran 2021-09-11 06:05:47 +05:30 committed by GitHub
parent f36952fea3
commit b171e56e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,13 +51,7 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
tlv = eeprom[tlv_index:tlv_index + 2
+ eeprom[tlv_index + 1]]
code = "0x%02X" % tlv[0]
if tlv[0] == self._TLV_CODE_VENDOR_EXT:
value = str((tlv[2] << 24) | (tlv[3] << 16) |
(tlv[4] << 8) | tlv[5])
value += tlv[6:6 + tlv[1]].decode('ascii')
else:
name, value = self.decoder(None, tlv)
name, value = self.decoder(None, tlv)
self.eeprom_tlv_dict[code] = value
if eeprom[tlv_index] == self._TLV_CODE_CRC_32: