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
I do not enough about other OSes but imho this is a system-wide setting in at least FreeBSD 5.2.1
PATH_MAX is found in #62 sys/syslimits.h
Because static int ufs_pathconf()
which returns the PATHCONF
information for UFS FS, uses this variable in the manner you specified.
/*
* Return POSIX pathconf information applicable to ufs filesystems.
*/
int
ufs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
int a_name;
int *a_retval;
} */ *ap;
{
switch (ap->a_name) {
.
.
.
.
case _PC_PATH_MAX:
*ap->a_retval = PATH_MAX;
return (0);
.
.
.
.
default:
return (EINVAL);
}
/* NOTREACHED */
}