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=liming.gao@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 2320422436929 for ; Fri, 23 Feb 2018 01:58:33 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2018 02:04:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,382,1515484800"; d="scan'208";a="29232104" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 23 Feb 2018 02:04:35 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 23 Feb 2018 02:04:35 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 23 Feb 2018 02:04:34 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Fri, 23 Feb 2018 18:04:33 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Add check for INF statement must be a .inf file Thread-Index: AQHTn98J8aVlECQ3qUm3mzVxgcjXCqOx26MA Date: Fri, 23 Feb 2018 10:04:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1CEEE9@SHSMSX104.ccr.corp.intel.com> References: <1517985827-1388-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1517985827-1388-1-git-send-email-yonghong.zhu@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: Add check for INF statement must be a .inf file 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: Fri, 23 Feb 2018 09:58:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhu= , >Yonghong >Sent: Wednesday, February 07, 2018 2:44 PM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Add check for INF statement must be a .= inf >file > >Per FDF spec, INF statement must use a .inf file, we add this error >check. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/GenFds/FdfParser.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py >b/BaseTools/Source/Python/GenFds/FdfParser.py >index 0190be8..44a3564 100644 >--- a/BaseTools/Source/Python/GenFds/FdfParser.py >+++ b/BaseTools/Source/Python/GenFds/FdfParser.py >@@ -1,9 +1,9 @@ > ## @file > # parse FDF file > # >-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
>+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> # Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.
> # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the = BSD >License > # which accompanies this distribution. The full text of the license may= be >found at >@@ -2484,10 +2484,12 @@ class FdfParser: > self.__GetInfOptions(ffsInf) > > if not self.__GetNextToken(): > raise Warning("expected INF file path", self.FileName, >self.CurrentLineNumber) > ffsInf.InfFileName =3D self.__Token >+ if not ffsInf.InfFileName.endswith('.inf'): >+ raise Warning("expected .inf file path", self.FileName, >self.CurrentLineNumber) > > ffsInf.CurrentLineNum =3D self.CurrentLineNumber > ffsInf.CurrentLineContent =3D self.__CurrentLine() > > #Replace $(SAPCE) with real space >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel