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.7726.1604024731939959375 for ; Thu, 29 Oct 2020 19:25:33 -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:25:18 +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> In-Reply-To: <8807A0D5-BEDB-45CB-A344-051A9274354D@apple.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gV2h5IGlzIE1BWF9MT05HX0ZJTEVfUEFUSCA1MDAgdnMuIFBBVEhfTUFYPw==?= Date: Fri, 30 Oct 2020 10:25:25 +0800 Message-ID: <006b01d6ae63$ed567570$c8036050$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKbLGJT/XOD68BDxkec3COeiUFNOQHORCjlAZvIJ5KoCxxYcA== Content-Type: multipart/alternative; boundary="----=_NextPart_000_006C_01D6AEA6.FB7AEDF0" Content-Language: zh-cn ------=_NextPart_000_006C_01D6AEA6.FB7AEDF0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 #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 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 = 9:37 =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming =E6=8A=84=E9=80=81: devel@edk2.groups.io =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 ------=_NextPart_000_006C_01D6AEA6.FB7AEDF0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Andrew:

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

 

#ifdef PATH_MAX

#define MAX_LONG_FILE_PATH PATH_MAX

#else

#def= ine MAX_LONG_FILE_PATH 500

#endif

 

Thanks

Liming

=E5= =8F=91=E4=BB=B6=E4=BA=BA: bounce= +27952+66793+4905953+8761045@groups.io <bounce+27952+66793+4905953+87610= 45@groups.io> =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 9:37
=E6=94=B6=E4=BB= =B6=E4=BA=BA: gaoliming &= lt;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_FILE_PATH 500 vs. PATH_MAX?

 

 



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

 

<= div>

 

Andrew Fish



Thanks

<= p class=3DMsoNormal>Liming

=E5=8F=91=E4=BB=B6=E4=BA=BA: <= span lang=3DEN-US style=3D'font-size:11.0pt;font-family:=E7=AD=89=E7=BA=BF'= >bounce+279= 52+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
=E6=94=B6=E4=BB=B6=E4=BA=BA: <= /span>edk2-devel-groups-io <devel@edk2.groups.io>
=E4=B8=BB= =E9=A2=98: [edk2-devel] Wh= y 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 PAT= H_MAX?

=  

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

 

 

 

Thanks,

 

Andrew Fish

 <= /span>

------=_NextPart_000_006C_01D6AEA6.FB7AEDF0--