From nobody Sat May 4 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526258753381489.6186458569757; Sun, 13 May 2018 17:45:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 27FE8207E36B8; Sun, 13 May 2018 17:45:50 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 B3CC4207E36B4 for ; Sun, 13 May 2018 17:45:48 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2018 17:45:48 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga004.jf.intel.com with ESMTP; 13 May 2018 17:45:47 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,398,1520924400"; d="scan'208";a="199048520" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Mon, 14 May 2018 08:45:45 +0800 Message-Id: <1526258745-22648-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When the file is not exist in workspace or packages path, current Gensec tool doesn't report exactly error message. FILE FV_IMAGE =3D 11111111-4CF1-42D8-A0C3-B3F60779dF4D { SECTION GUIDED A7717414-C616-4977-9420-844712A735BF { SECTION FV_IMAGE =3D TestPkg/Test.fd } } Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FvImageSection.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/S= ource/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.Work= SpaceDir) + else: + EdkLogger.error("GenFds", FILE_NOT_FOUND, "%s = is not found in packages path:\n\t%s" % (self.FvFileName, '\n\t'.join(mws.g= etPkgPath()))) + else: EdkLogger.error("GenFds", GENFDS_ERROR, "FvImageSectio= n Failed! %s NOT found in FDF" % self.FvName) =20 # # Prepare the parameter of GenSection --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel