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.web09.8102.1604026418367794101 for ; Thu, 29 Oct 2020 19:53:39 -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 ; Fri, 30 Oct 2020 10:53:23 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , References: <86A23533-E614-4B71-BA87-6BFF8338E0FA@apple.com> <004d01d6ae5c$e1228b10$a367a130$@byosoft.com.cn> <8807A0D5-BEDB-45CB-A344-051A9274354D@apple.com> <006b01d6ae63$ed567570$c8036050$@byosoft.com.cn> <0167F6C2-E61F-4847-8193-3FE5C4D9ED2E@apple.com> In-Reply-To: <0167F6C2-E61F-4847-8193-3FE5C4D9ED2E@apple.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gV2h5IGlzIE1BWF9MT05HX0ZJTEVfUEFUSCA1MDAgdnMuIFBBVEhfTUFYPw==?= Date: Fri, 30 Oct 2020 10:53:30 +0800 Message-ID: <007801d6ae67$d99651a0$8cc2f4e0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKbLGJT/XOD68BDxkec3COeiUFNOQHORCjlAZvIJ5ICBD6ClwGs+fsRp+2cmOA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_0079_01D6AEAA.E7BB6660" Content-Language: zh-cn ------=_NextPart_000_0079_01D6AEAA.E7BB6660 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Yes. #include is required for PATH_MAX https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html =20 =20 =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66797+4905953+8761045@groups.io = =E4=BB=A3=E8=A1=A8 Andrew Fi= sh via groups.io =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830=E6=97=A5 = 10:28 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com.c= n =E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PAT= H_MAX? =20 =20 On Oct 29, 2020, at 7:25 PM, gaoliming > wrote: =20 Andrew: Windows defines _MAX_PATH macro. But, its value is 260. It is not enough.= To fix your issue, MAX_LONG_FILE_PATH can be updated as below.=20 =20 =20 OK I=E2=80=99ll file a BZ. It may also require adding an include? =20 Thanks, =20 Andrew Fish #ifdef PATH_MAX #define MAX_LONG_FILE_PATH PATH_MAX #else #define MAX_LONG_FILE_PATH 500 #endif =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66793+4905953+8761045@groups.io = > =E4=BB=A3=E8=A1=A8 Andrew Fish via groups.io =20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830=E6=97=A5 = 9:37 =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming > =E6=8A=84=E9=80=81: devel@edk2.groups.io =20 =E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PAT= H_MAX? =20 =20 On Oct 29, 2020, at 6:34 PM, gaoliming > wrote: =20 This macro is added to resolve the limitation on WINDOWS OS for the length= of entire file path can=E2=80=99t be larger than 255. It use the hard code= 500, because 500 is enough for most case. Do you meet with the problem tha= t the file path length exceeds 500? =20 =20 Yes locally we have changed it to PATH_MAX to fix a build break we hit. Do= es Windows support PATH_MAX? =20 Thanks, =20 Andrew Fish Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66762+4905953+8761045@groups.io = > =E4=BB=A3=E8=A1=A8 Andrew Fish via groups.io =20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830=E6=97=A5 = 1:24 =E6=94=B6=E4=BB=B6=E4=BA=BA: edk2-devel-groups-io > =E4=B8=BB=E9=A2=98: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_MA= X? =20 Does anyone know why MAX_LONG_FILE_PATH [1] is hard coded to 500 vs. using= the systems PATH_MAX? =20 On Linux I think PATH_MAX is 4KiB and on macOS it is 1KiB. =20 =20 [1] https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Commo= n/CommonLib.h#L17 =20 Thanks, =20 Andrew Fish =20 =20 ------=_NextPart_000_0079_01D6AEAA.E7BB6660 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Yes. #include <lim= its.h> is required for PATH_MAX

https://pubs.opengroup.org/onlinepubs/9699919799= /basedefs/limits.h.html

 

 

=E5=8F=91=E4=BB=B6=E4=BA=BA:= bounce+27952+66797+4905953+8761045@groups.io <boun= ce+27952+66797+4905953+8761045@groups.io> =E4=BB=A3=E8=A1=A8 <= span lang=3DEN-US style=3D'font-size:11.0pt;font-family:=E7=AD=89=E7=BA=BF'= >Andrew Fish via groups.io
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C= = =8830=E6=97=A5 10:28
=E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com.cn
=E4= =B8=BB=E9=A2=98: Re: [edk= 2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX?

 =

 =



=

On Oct 29, 2020, at 7:25 PM, gaoliming <= ;gaoliming@byosoft.com.cn&g= t; wrote:

 

Andrew:

=  Windows defines _MAX_PATH macro. But, its value is 260. It is not e= nough. To fix your issue, MAX_LONG_FILE_PATH can be updated as below. <= /o:p>

 

 

OK I=E2=80=99ll file a BZ. It may also req= uire adding an include?

 

Thanks,

 

Andrew Fish



#ifdef PATH_MAX

#define MAX_LONG_FILE_PATH&nbs= p;PATH_MAX

#else

#define MAX_LONG_FILE_PATH 500

= #endif

 

Thanks<= /span>

Liming

=E5=8F=91=E4= =BB=B6=E4=BA=BA: bounce+27952+66793+4905953+8761045@groups.io <bounce+27952+66793+4905953+8761= 045@groups.io> =E4=BB= = =A3=E8=A1=A8 <= /span>Andrew Fish via groups.io
=E5=8F=91=E9= =80=81=E6=97=B6=E9=97=B4:
 2020=E5=B9=B410=E6=9C=8830=E6=97=A5 9:37
=E6=94=B6=E4=BB=B6=E4=BA=BA:<= /b> gaoliming <gaoliming@byosoft.com.cn>
=E6=8A=84=E9=80=81: devel@edk2.groups.io
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_F= ILE_PATH 500 vs. PATH_MAX?

 =

&n= bsp;




On Oct 29, 2020, at 6:34 PM, gaoliming <gaoliming@byosoft.com.cn> wrote:

 

This macro is= added to resolve the limitation on WINDOWS OS for the length of entire fil= e path can=E2=80=99t be larger than 255. It use the hard = code 500, because 500 is enough for most case. Do you meet with the problem= that the file path length exceeds 500?

 

<= div>

 

Yes locally= we have changed it to PATH_MAX to fix a build break we hit. Does Windows s= upport PATH_MAX?

 

=

Thanks,

=

 

Andr= ew Fish




Th= anks

<= p class=3DMsoNormal>Liming

=E5=8F=91=E4=BB=B6=E4=BA= =BA: bounce+27952+66762+4905953+8761045@groups.io <bounce+27952+66762+4905953+8761045@groups.i= o> =E4=BB=A3=E8=A1=A8=  = Andrew Fish via groups.io
=E5=8F=91=E9=80=81=E6=97= =B6=E9=97=B4: 2020=E5=B9=B410= =E6=9C=8830=E6=97=A5 1:24
<= /span>=E6=94=B6=E4=BB=B6=E4=BA=BA: edk2-devel-groups-io <devel@edk2.groups.io>
=E4=B8=BB=E9=A2=98:&nb= sp;[edk2-devel] Why is MAX_LONG_FILE_PATH = 500 vs. PATH_MAX?

 

Does anyone know why MAX_LONG_FILE_PATH [1] is hard coded = to 500 vs. using the systems PATH_MAX?<= /o:p>

&= nbsp;

On Linux I think PATH_MAX is 4KiB and o= n macOS it is 1KiB.

 

 

 =

<= p class=3DMsoNormal>Thanks,=

 =

<= p class=3DMsoNormal>Andrew Fish

 

<= /div>

 

------=_NextPart_000_0079_01D6AEAA.E7BB6660--