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 3D2402035626F for ; Tue, 5 Dec 2017 06:54:26 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Dec 2017 06:58:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,364,1508828400"; d="scan'208";a="156264744" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 05 Dec 2017 06:58:56 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 5 Dec 2017 06:58:56 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 5 Dec 2017 06:58:55 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Tue, 5 Dec 2017 22:58:54 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: Leif Lindholm Thread-Topic: [edk2] [Patch] BaseTools: Fix GenSec GCC make failure Thread-Index: AQHTbdDtukwnRWWHCEWvNW7Uqb5l+6M013jg Date: Tue, 5 Dec 2017 14:58:53 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18AA0E@SHSMSX104.ccr.corp.intel.com> References: <1512482099-2156-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1512482099-2156-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix GenSec GCC make failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:54:26 -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 Yo= nghong Zhu > Sent: Tuesday, December 5, 2017 9:55 PM > To: edk2-devel@lists.01.org > Cc: Leif Lindholm ; Gao, Liming > Subject: [edk2] [Patch] BaseTools: Fix GenSec GCC make failure >=20 > It is a regression bug introduced by the patch b37b108, it cause GenSec > make failure on GCC Env. >=20 > Cc: Liming Gao > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/C/GenSec/GenSec.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenS= ec/GenSec.c > index 2b2def1..5545f12 100644 > --- a/BaseTools/Source/C/GenSec/GenSec.c > +++ b/BaseTools/Source/C/GenSec/GenSec.c > @@ -1324,11 +1324,11 @@ Returns: > // Open file and read contents > // > DummyFile =3D fopen (LongFilePath (DummyFileName), "rb"); > if (DummyFile =3D=3D NULL) { > Error (NULL, 0, 0001, "Error opening file", DummyFileName); > - return EFI_ABORTED; > + goto Finish; > } >=20 > fseek (DummyFile, 0, SEEK_END); > DummyFileSize =3D ftell (DummyFile); > fseek (DummyFile, 0, SEEK_SET); > @@ -1338,22 +1338,22 @@ Returns: > DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s an= d the size is %u bytes", DummyFileName, (unsigned) > DummyFileSize); >=20 > InFile =3D fopen(LongFilePath(InputFileName[0]), "rb"); > if (InFile =3D=3D NULL) { > Error (NULL, 0, 0001, "Error opening file", InputFileName[0]); > - return EFI_ABORTED; > + goto Finish; > } >=20 > fseek (InFile, 0, SEEK_END); > InFileSize =3D ftell (InFile); > fseek (InFile, 0, SEEK_SET); > InFileBuffer =3D (UINT8 *) malloc (InFileSize); > fread(InFileBuffer, 1, InFileSize, InFile); > fclose(InFile); > DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s an= d the size is %u bytes", InputFileName[0], (unsigned) > InFileSize); > if (InFileSize > DummyFileSize){ > - if (stricmp(DummyFileBuffer, InFileBuffer + (InFileSize - DummyF= ileSize)) =3D=3D 0){ > + if (stricmp((CHAR8 *)DummyFileBuffer, (CHAR8 *)(InFileBuffer + (= InFileSize - DummyFileSize))) =3D=3D 0){ > SectGuidHeaderLength =3D InFileSize - DummyFileSize; > } > } > if (SectGuidHeaderLength =3D=3D 0) { > SectGuidAttribute |=3D EFI_GUIDED_SECTION_PROCESSING_REQUIRED; > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel