Defining PATH_MAX for a filesystem?

前端 未结 6 1596
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 02:09

I\'m presently writing a filesystem. The statvfs (and even the statfs) structs contain a field specifying the maximum length of a name in that path. As PATH_M

6条回答
  •  你的背包
    2021-02-04 02:39

    PATH_MAX is a system wide setting and is usually defined in pathmax.h as:

    define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
                : pathconf ("/", _PC_PATH_MAX))
    

提交回复
热议问题