public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <afish@apple.com>
Subject: 回复: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX?
Date: Fri, 30 Oct 2020 10:25:25 +0800	[thread overview]
Message-ID: <006b01d6ae63$ed567570$c8036050$@byosoft.com.cn> (raw)
In-Reply-To: <8807A0D5-BEDB-45CB-A344-051A9274354D@apple.com>

[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]

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. 

 

#ifdef PATH_MAX

#define MAX_LONG_FILE_PATH PATH_MAX

#else

#define MAX_LONG_FILE_PATH 500

#endif

 

Thanks

Liming

发件人: bounce+27952+66793+4905953+8761045@groups.io <bounce+27952+66793+4905953+8761045@groups.io> 代表 Andrew Fish via groups.io
发送时间: 2020年10月30日 9:37
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: devel@edk2.groups.io
主题: 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 <mailto:gaoliming@byosoft.com.cn> > wrote:

 

This macro is added to resolve the limitation on WINDOWS OS for the length of entire file path can’t 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?

 

 

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

 

Thanks,

 

Andrew Fish





Thanks

Liming

发件人: bounce+27952+66762+4905953+8761045@groups.io <mailto:bounce+27952+66762+4905953+8761045@groups.io>  <bounce+27952+66762+4905953+8761045@groups.io <mailto:bounce+27952+66762+4905953+8761045@groups.io> > 代表 Andrew Fish via groups.io <http://groups.io> 
发送时间: 2020年10月30日 1:24
收件人: edk2-devel-groups-io <devel@edk2.groups.io <mailto:devel@edk2.groups.io> >
主题: [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?

 

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

 

 

[1] https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Common/CommonLib.h#L17

 

Thanks,

 

Andrew Fish

 




[-- Attachment #2: Type: text/html, Size: 10969 bytes --]

  reply	other threads:[~2020-10-30  2:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 17:24 Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX? Andrew Fish
2020-10-30  1:34 ` 回复: [edk2-devel] " gaoliming
2020-10-30  1:37   ` Andrew Fish
2020-10-30  2:25     ` gaoliming [this message]
2020-10-30  2:27       ` Andrew Fish
2020-10-30  2:53         ` 回复: " gaoliming
2020-10-30  2:54           ` Andrew Fish
2020-10-30  3:10             ` 回复: " gaoliming

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='006b01d6ae63$ed567570$c8036050$@byosoft.com.cn' \
    --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