From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web11.8458.1602583269956161995 for ; Tue, 13 Oct 2020 03:01:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 13 Oct 2020 18:01:06 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Yunhua Feng'" References: <20201013092035.24440-1-bob.c.feng@intel.com> In-Reply-To: <20201013092035.24440-1-bob.c.feng@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoXSBbZWRrMi1zdGFnaW5nXUJhc2VUb29scy9GbW10OiBGaXhlZCBGTU1UIExpbnV4IGJ1aWxkIGJyZWFrIGlzc3Vl?= Date: Tue, 13 Oct 2020 18:01:07 +0800 Message-ID: <000a01d6a147$c55c0360$50140a20$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFXhAGpZIAPM94qcYLADQBbjAaBJqqThxdw Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Bob: I add my comments.=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+66170+4905953+8761045@groups.io > =B4=FA=B1=ED Bob Feng > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C213=C8=D5 17:21 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Yunhua Feng ; Liming Gao > > =D6=F7=CC=E2: [edk2-devel] [Patch] [edk2-staging]BaseTools/Fmmt: Fixed F= MMT Linux > build break issue >=20 > Fixed the FMMT Linux build issue which was introduced > by the commit 950333853b5fe2b73a7b5148501458cc97a01481 >=20 > Signed-off-by: Bob Feng > Cc: Yunhua Feng > Cc: Liming Gao > --- > .../Source/C/FMMT/FirmwareModuleManagement.c | 15 > ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) >=20 > diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > index 20663ba163..8a7ae096d0 100644 > --- a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > +++ b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > @@ -9,11 +9,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > #include "FirmwareModuleManagement.h" > #include "Rebase.h" > #include > #include > - > +#if defined(__linux__) > +#include What's purpose for the header file limits.h? > +#define _MAX_DIR PATH_MAX Can you use _MAX_PATH in the code to replace _MAX_DIR? _MAX_PATH is define= d here.=20 Thanks Liming > +#endif > CHAR8* mGuidToolDefinition =3D "FmmtConf.ini"; > extern EFI_FIRMWARE_VOLUME_HEADER *mFvHeader; > extern UINT32 mFvLength; >=20 > // > @@ -1715,15 +1718,10 @@ FmmtImageExtract ( > EFI_STATUS Status; > FIRMWARE_DEVICE *FdData; > FV_INFORMATION *FvInFd; > UINT32 Index; > UINT32 FfsFoundFlag; > - FFS_INFORMATION *OutputFileName; > - FILE* NewFdFile; > - FILE* NewFvFile; > - UINT64 NewFvLength; > - VOID* Buffer; > CHAR8 *TemDir; > UINT8 FvNumInFd; > UINT32 Offset; > UINT8 *FdBuffer; > EFI_FFS_FILE_HEADER2 *CurrentFile; > @@ -1738,18 +1736,13 @@ FmmtImageExtract ( > int j; > CHAR8 FfsOutputFileName[_MAX_DIR]; >=20 > FdSize =3D 0; > Index =3D 0; > - NewFvLength =3D 0; > FfsFoundFlag =3D 0; > FdData =3D NULL; > FvInFd =3D NULL; > - OutputFileName =3D NULL; > - NewFdFile =3D NULL; > - NewFvFile =3D NULL; > - Buffer =3D NULL; > TemDir =3D NULL; > FvNumInFd =3D 0; > Offset =3D 0; > FdBuffer =3D NULL; > if (sizeof(FfsOutFileOrDirName) > _MAX_DIR) { > -- > 2.20.1.windows.1 >=20 >=20 >=20 >=20 >=20