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.web12.779.1602637015416438578 for ; Tue, 13 Oct 2020 17:56:57 -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 ; Wed, 14 Oct 2020 08:56:51 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Feng, Bob C'" , Cc: "'Yunhua Feng'" References: <20201013092035.24440-1-bob.c.feng@intel.com> <000a01d6a147$c55c0360$50140a20$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoXSBbZWRrMi1zdGFnaW5nXUJhc2VUb29scy9GbW10OiBGaXhlZCBGTU1UIExpbnV4IGJ1aWxkIGJyZWFrIGlzc3Vl?= Date: Wed, 14 Oct 2020 08:56:52 +0800 Message-ID: <001e01d6a1c4$e7f826b0$b7e87410$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFXhAGpZIAPM94qcYLADQBbjAaBJgIPu34eAZf8Q4yqd0IDkA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Got it. Here should be _MAX_PATH. Yunhua, can you fix this build issue on L= inux?=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Feng, Bob C > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8813=E6=97= =A5 18:35 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel= @edk2.groups.io > =E6=8A=84=E9=80=81: 'Yunhua Feng' > =E4=B8=BB=E9=A2=98: RE: [edk2-devel] [Patch] [edk2-staging]BaseTools/Fmm= t: Fixed FMMT > Linux build break issue >=20 > Hi Liming, >=20 > What's purpose for the header file limits.h? > Bob: To get the Macro PATH_MAX definition. There is no _MAX_DIR or > _MAX_PATH Macro on Linux. >=20 > Can you use _MAX_PATH in the code to replace _MAX_DIR? _MAX_PATH is > defined here. > Bob: The original code use _MAX_DIR. It does not cause the build break. = If > you and Yunhua confirm there should be _MAX_PATH, I can create another > patch to change the _MAX_DIR to _MAX_PATH >=20 > Thanks, > Bob >=20 > -----Original Message----- > From: gaoliming > Sent: Tuesday, October 13, 2020 6:01 PM > To: devel@edk2.groups.io; Feng, Bob C > Cc: 'Yunhua Feng' > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch] [edk2-staging]BaseTool= s/Fmmt: Fixed > FMMT Linux build break issue >=20 > Bob: > I add my comments. >=20 > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66170+4905953+8761045@groups= .io > > =E4=BB=A3=E8=A1=A8 Bob = Feng > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8813=E6=97= = =A5 17:21 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > > =E6=8A=84=E9=80=81: Yunhua Feng ; Liming Ga= o > > > > =E4=B8=BB=E9=A2=98: [edk2-devel] [Patch] [edk2-staging]BaseTools/Fmmt:= Fixed FMMT > > Linux build break issue > > > > Fixed the FMMT Linux build issue which was introduced by the commit > > 950333853b5fe2b73a7b5148501458cc97a01481 > > > > Signed-off-by: Bob Feng > > Cc: Yunhua Feng > > Cc: Liming Gao > > --- > > .../Source/C/FMMT/FirmwareModuleManagement.c | 15 > > ++++----------- > > 1 file changed, 4 insertions(+), 11 deletions(-) > > > > 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 > > > > #include "FirmwareModuleManagement.h" > > #include "Rebase.h" > > #include > > #include > > - > > +#if defined(__linux__) > > +#include >=20 > What's purpose for the header file limits.h? >=20 > > +#define _MAX_DIR PATH_MAX >=20 > Can you use _MAX_PATH in the code to replace _MAX_DIR? _MAX_PATH is > defined here. >=20 > Thanks > Liming > > +#endif > > CHAR8* mGuidToolDefinition =3D "FmmtConf.ini"; > > extern EFI_FIRMWARE_VOLUME_HEADER *mFvHeader; > > extern UINT32 mFvLength; > > > > // > > @@ -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]; > > > > 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