From 023c4a92aa992cb7aebdc45009d7bb3f9334d721 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 23 Sep 2021 08:05:15 -0400 Subject: [PATCH] Fix build id on SMMv1 SMMv1 was broken by the SMMv2 fix. The leading of the result changed as well as the trailing being adaptive in SMMv2. Change-Id: I07eb2073366f33619624e5c0eae8b0795d416ea5 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index a1fe9419..21d7b9fb 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -326,10 +326,12 @@ def get_fpc_firmware(bmcver, ipmicmd, fpcorsmm): if fpcorsmm != 6: # SMM if fpcorsmm >> 5: name = 'SMM2' + buildid = '{0}{1}{2}{3}{4}{5}{6}'.format( + *[chr(x) for x in builddata[6:13]]) else: name = 'SMM' - buildid = '{0}{1}{2}{3}{4}{5}{6}'.format( - *[chr(x) for x in builddata[6:13]]) + buildid = '{0}{1}{2}{3}{4}{5}{6}'.format( + *[chr(x) for x in builddata[5:12]]) elif len(builddata) == 8: builddata = builddata[1:] # discard the 'completion code' name = 'FPC'