public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [Patch] BaseTools: Fix GenSec GCC make failure
Date: Tue, 5 Dec 2017 14:58:53 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18AA0E@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1512482099-2156-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yonghong Zhu
> Sent: Tuesday, December 5, 2017 9:55 PM
> To: edk2-devel@lists.01.org
> Cc: Leif Lindholm <leif.lindholm@linaro.org>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [Patch] BaseTools: Fix GenSec GCC make failure
> 
> It is a regression bug introduced by the patch b37b108, it cause GenSec
> make failure on GCC Env.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/C/GenSec/GenSec.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/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 = fopen (LongFilePath (DummyFileName), "rb");
>        if (DummyFile == NULL) {
>          Error (NULL, 0, 0001, "Error opening file", DummyFileName);
> -        return EFI_ABORTED;
> +        goto Finish;
>        }
> 
>        fseek (DummyFile, 0, SEEK_END);
>        DummyFileSize = ftell (DummyFile);
>        fseek (DummyFile, 0, SEEK_SET);
> @@ -1338,22 +1338,22 @@ Returns:
>        DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s and the size is %u bytes", DummyFileName, (unsigned)
> DummyFileSize);
> 
>        InFile = fopen(LongFilePath(InputFileName[0]), "rb");
>        if (InFile == NULL) {
>          Error (NULL, 0, 0001, "Error opening file", InputFileName[0]);
> -        return EFI_ABORTED;
> +        goto Finish;
>        }
> 
>        fseek (InFile, 0, SEEK_END);
>        InFileSize = ftell (InFile);
>        fseek (InFile, 0, SEEK_SET);
>        InFileBuffer = (UINT8 *) malloc (InFileSize);
>        fread(InFileBuffer, 1, InFileSize, InFile);
>        fclose(InFile);
>        DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[0], (unsigned)
> InFileSize);
>        if (InFileSize > DummyFileSize){
> -        if (stricmp(DummyFileBuffer, InFileBuffer + (InFileSize - DummyFileSize)) == 0){
> +        if (stricmp((CHAR8 *)DummyFileBuffer, (CHAR8 *)(InFileBuffer + (InFileSize - DummyFileSize))) == 0){
>            SectGuidHeaderLength = InFileSize - DummyFileSize;
>          }
>        }
>        if (SectGuidHeaderLength == 0) {
>          SectGuidAttribute |= EFI_GUIDED_SECTION_PROCESSING_REQUIRED;
> --
> 2.6.1.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  parent reply	other threads:[~2017-12-05 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 13:54 [Patch] BaseTools: Fix GenSec GCC make failure Yonghong Zhu
2017-12-05 14:14 ` Leif Lindholm
2017-12-05 14:50   ` Leif Lindholm
2017-12-05 14:58     ` Gao, Liming
2017-12-05 14:58 ` Gao, Liming [this message]
2017-12-05 18:19 ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E18AA0E@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox