From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B0DD221ED76C for ; Mon, 25 Dec 2017 23:59:31 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2017 00:04:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,459,1508828400"; d="scan'208";a="21397167" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 26 Dec 2017 00:04:25 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 26 Dec 2017 00:04:24 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 26 Dec 2017 00:04:24 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Tue, 26 Dec 2017 16:04:23 +0800 From: "Zhu, Yonghong" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Update SkuId checker to make sure it be valid UINT64 value Thread-Index: AQHTfh95OBf/hPoehky6QYzds2TGJqNVQ9dg Date: Tue, 26 Dec 2017 08:04:22 +0000 Message-ID: References: <1514275149-10652-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1514275149-10652-1-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Update SkuId checker to make sure it be valid UINT64 value X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 07:59:32 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please remove the " Signed-off-by" info in Cc. Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Gao, Liming=20 Sent: Tuesday, December 26, 2017 3:59 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Feng, Bob C Subject: [Patch] BaseTools: Update SkuId checker to make sure it be valid U= INT64 value Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu Cc: Signed-off-by: Bob Feng --- BaseTools/Source/Python/Common/Misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Pyth= on/Common/Misc.py index 0374be0..f440008 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -2149,10 +2149,10 @@ class SkuClass(): for SkuName in SkuIds: SkuId =3D SkuIds[SkuName][0] skuid_num =3D int(SkuId,16) if SkuId.upper().startswith("0X") = else int(SkuId) - if skuid_num > 0xFFFF: + if skuid_num > 0xFFFFFFFFFFFFFFFF: EdkLogger.error("build", PARAMETER_INVALID, - ExtraData =3D "SKU-ID [%s] must less than 6553= 5" - % (SkuName)) + ExtraData =3D "SKU-ID [%s] value %s exceeds th= e max value of UINT64" + % (SkuName, SkuId)) =20 self.AvailableSkuIds =3D sdict() self.SkuIdSet =3D [] --=20 2.8.0.windows.1