From 8401d3983d00194b5a9aa77cf65477bfc1716588 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Thu, 24 Nov 2016 23:19:57 +0800 Subject: BaseTools: Fix bug for decimal value of VPDPCD offset display in report current if we set VPD PCD's offset to a decimal value, eg: 22, this value is displayed incorrectly in the "FD VPD Region" section in the report.txt. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/build/BuildReport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/build/BuildReport.py') diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index 4c57754b3b..fb28970f66 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1560,7 +1560,10 @@ class FdReport(object): try: PcdName, SkuId, Offset, Size, Value = Line.split("#")[0].split("|") PcdName, SkuId, Offset, Size, Value = PcdName.strip(), SkuId.strip(), Offset.strip(), Size.strip(), Value.strip() - Offset = '0x%08X' % (int(Offset, 16) + self.VPDBaseAddress) + if Offset.lower().startswith('0x'): + Offset = '0x%08X' % (int(Offset, 16) + self.VPDBaseAddress) + else: + Offset = '0x%08X' % (int(Offset, 10) + self.VPDBaseAddress) self.VPDInfoList.append("%s | %s | %s | %s | %s" % (PcdName, SkuId, Offset, Size, Value)) except: EdkLogger.error("BuildReport", CODE_ERROR, "Fail to parse VPD information file %s" % self.VpdFilePath) -- cgit v1.2.3