From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 6FA33203B8CF6 for ; Mon, 14 May 2018 07:38:24 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 07:38:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,400,1520924400"; d="scan'208";a="41659189" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 14 May 2018 07:38:23 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 14 May 2018 07:38:23 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.228]) by FMSMSX109.amr.corp.intel.com ([169.254.15.12]) with mapi id 14.03.0319.002; Mon, 14 May 2018 07:38:23 -0700 From: "Carsey, Jaben" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Enhance error message when file is not exist for Gensec Thread-Index: AQHT6xzuWqqalsjWEEGkUuwFJKBTZqQvTCtQ Date: Mon, 14 May 2018 14:38:22 +0000 Message-ID: References: <1526258745-22648-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1526258745-22648-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjk0MzE3OTEtZTNlYy00NTM4LWJkNjctNWNjNjU2NmNmNzA2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijd2cGU5bVZ4ZnY1cEpubGp3NTY5ZTZXMytzbmRZUVl5b1dmbkVcL2JlSjZ3PSJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Enhance error message when file is not exist for Gensec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 14:38:24 -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: Sunday, May 13, 2018 5:46 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Enhance error message when file is not > exist for Gensec >=20 > When the file is not exist in workspace or packages path, current > Gensec tool doesn't report exactly error message. >=20 > FILE FV_IMAGE =3D 11111111-4CF1-42D8-A0C3-B3F60779dF4D { > SECTION GUIDED A7717414-C616-4977-9420-844712A735BF { > SECTION FV_IMAGE =3D TestPkg/Test.fd > } > } >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/GenFds/FvImageSection.py | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py > b/BaseTools/Source/Python/GenFds/FvImageSection.py > index 57ecea0..3a4d8fb 100644 > --- a/BaseTools/Source/Python/GenFds/FvImageSection.py > +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py > @@ -131,10 +131,16 @@ class FvImageSection(FvImageSectionClassObject): > self.Alignment =3D str (FvAlignmentValue= / 0x400) + "K" > else: > # FvAlignmentValue is less than 1K > self.Alignment =3D str (FvAlignmentValue) > FvFileObj.close() > + else: > + if len (mws.getPkgPath()) =3D=3D 0: > + EdkLogger.error("GenFds", FILE_NOT_FOUND, "%= s is not > found in WORKSPACE: %s" % self.FvFileName, > GenFdsGlobalVariable.WorkSpaceDir) > + else: > + EdkLogger.error("GenFds", FILE_NOT_FOUND, "%= s is not > found in packages path:\n\t%s" % (self.FvFileName, > '\n\t'.join(mws.getPkgPath()))) > + > else: > EdkLogger.error("GenFds", GENFDS_ERROR, "FvImageSect= ion > Failed! %s NOT found in FDF" % self.FvName) >=20 > # > # Prepare the parameter of GenSection > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel