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
POSIX allows _PC_PATH_MAX
to vary based on the current directory, but that doesn't mean that systems which don't vary it aren't compliant.
The real reason for PATH_MAX
existing is that the kernel copies the pathname into kernelspace before doing any actual work with it.
Your assertion that there is a PATH_MAX
-related field in statvfs
is just wrong. That's related to NAME_MAX
, which is a different thing.