diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-04-28 06:32:32 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-04 13:03:05 +0800 |
commit | 5565a8c4d2196b5e55e702169feefeeb07a330d9 (patch) | |
tree | 209dad0eab7b1fe7d3993ddaff977249b4efa0b3 /BaseTools/Source/Python/Common/VpdInfoFile.py | |
parent | 88252a90d1ca7846731cd2e4e8e860454f7d97a3 (diff) | |
download | edk2-5565a8c4d2196b5e55e702169feefeeb07a330d9.tar.gz edk2-5565a8c4d2196b5e55e702169feefeeb07a330d9.tar.bz2 edk2-5565a8c4d2196b5e55e702169feefeeb07a330d9.zip |
BaseTools: move PCD size calculation functions to PcdClassObject
move both GetPcdMaxSize and GetPcdSize to the PcdClassObject.
fix MAX_SIZE_TYPE to have int values
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/VpdInfoFile.py')
-rw-r--r-- | BaseTools/Source/Python/Common/VpdInfoFile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 155693740f..32895deb5d 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -99,7 +99,7 @@ class VpdInfoFile: EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
"Invalid max datum size for VPD PCD %s.%s" % (Vpd.TokenSpaceGuidCName, Vpd.TokenCName))
elif Vpd.DatumType in TAB_PCD_NUMERIC_TYPES:
- if Vpd.MaxDatumSize is None or Vpd.MaxDatumSize == "":
+ if not Vpd.MaxDatumSize:
Vpd.MaxDatumSize = MAX_SIZE_TYPE[Vpd.DatumType]
else:
if Vpd.MaxDatumSize <= 0:
|