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.115; helo=mga14.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 92A3421164C6B for ; Mon, 15 Oct 2018 10:43:02 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2018 10:43:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,385,1534834800"; d="scan'208";a="241511664" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 15 Oct 2018 10:43:02 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 15 Oct 2018 10:43:01 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by fmsmsx117.amr.corp.intel.com ([169.254.3.34]) with mapi id 14.03.0319.002; Mon, 15 Oct 2018 10:43:01 -0700 From: "Carsey, Jaben" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix bugs use special character in the --pcd option Thread-Index: AQHUZIUTH4G1D2Hsqk2tgfnk75WClaUgk/hw Date: Mon, 15 Oct 2018 17:43:00 +0000 Message-ID: References: <1539607570-15996-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1539607570-15996-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzdlZjEwYzUtOGI2OC00ZTk1LWFkM2QtZTY2YzZjYjNkZjkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaWFUZkVZZU1LcGlWSnlHNyt2RnBLOW9jbmxoUGZ6TDlWZjFySHMrR3h3UkdEZlVsT0dESGJ1ckVSZGJpSUo4eiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix bugs use special character in the --pcd option X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2018 17:43:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Monday, October 15, 2018 5:46 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Fix bugs use special character in the = --pcd > option >=20 > Cases: > --pcd Token.Name=3D"!" > --pcd Token.Name=3D"\'W&\'" > --pcd Token.Name=3D"2*h" >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index aaef404..1a0a293 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -1078,10 +1078,12 @@ class DscBuildData(PlatformBuildClassObject): > if PcdValue.upper() =3D=3D 'TRUE': > PcdValue =3D str(1) > if not FieldName: > if PcdDatumType not in TAB_PCD_NUMERIC_TYPES: > PcdValue =3D '"' + PcdValue + '"' > + elif not PcdValue.isdigit() and not PcdValue.upper().sta= rtswith('0X'): > + PcdValue =3D '"' + PcdValue + '"' > else: > IsArray =3D False > Base =3D 10 > if PcdValue.upper().startswith('0X'): > Base =3D 16 > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel