BaseTools: Update SkuId checker to make sure it be valid UINT64 value
authorLiming Gao <liming.gao@intel.com>
Tue, 26 Dec 2017 07:59:09 +0000 (15:59 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 27 Dec 2017 02:29:46 +0000 (10:29 +0800)
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/Misc.py

index 0374be0..f440008 100644 (file)
@@ -2149,10 +2149,10 @@ class SkuClass():
         for SkuName in SkuIds:\r
             SkuId = SkuIds[SkuName][0]\r
             skuid_num = int(SkuId,16) if SkuId.upper().startswith("0X") else int(SkuId)\r
         for SkuName in SkuIds:\r
             SkuId = SkuIds[SkuName][0]\r
             skuid_num = int(SkuId,16) if SkuId.upper().startswith("0X") else int(SkuId)\r
-            if skuid_num > 0xFFFF:\r
+            if skuid_num > 0xFFFFFFFFFFFFFFFF:\r
                 EdkLogger.error("build", PARAMETER_INVALID,\r
                 EdkLogger.error("build", PARAMETER_INVALID,\r
-                            ExtraData = "SKU-ID [%s] must less than 65535"\r
-                                      % (SkuName))\r
+                            ExtraData = "SKU-ID [%s] value %s exceeds the max value of UINT64"\r
+                                      % (SkuName, SkuId))\r
         \r
         self.AvailableSkuIds = sdict()\r
         self.SkuIdSet = []\r
         \r
         self.AvailableSkuIds = sdict()\r
         self.SkuIdSet = []\r