ufs: Export UFS_MAXNAMLEN to pathconf, statfs
Rather than the global NAME_MAX constant. This change is required to support systems with a NAME_MAX/MAXNAMLEN that differs from UFS_MAXNAMLEN. This was missed in r313475 due to the alternative spelling ("NAME_MAX") of MAXNAMLEN. This change is also similar in spirit to r313780. Reported by: ngie@ Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
1bbe19e65b
commit
a96da1c3fb
@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <security/mac/mac_framework.h>
|
||||
|
||||
#include <ufs/ufs/dir.h>
|
||||
#include <ufs/ufs/extattr.h>
|
||||
#include <ufs/ufs/gjournal.h>
|
||||
#include <ufs/ufs/quota.h>
|
||||
@ -1434,7 +1435,7 @@ ffs_statfs(mp, sbp)
|
||||
sbp->f_files = fs->fs_ncg * fs->fs_ipg - UFS_ROOTINO;
|
||||
sbp->f_ffree = fs->fs_cstotal.cs_nifree + fs->fs_pendinginodes;
|
||||
UFS_UNLOCK(ump);
|
||||
sbp->f_namemax = NAME_MAX;
|
||||
sbp->f_namemax = UFS_MAXNAMLEN;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -2446,7 +2446,7 @@ ufs_pathconf(ap)
|
||||
*ap->a_retval = LINK_MAX;
|
||||
break;
|
||||
case _PC_NAME_MAX:
|
||||
*ap->a_retval = NAME_MAX;
|
||||
*ap->a_retval = UFS_MAXNAMLEN;
|
||||
break;
|
||||
case _PC_PATH_MAX:
|
||||
*ap->a_retval = PATH_MAX;
|
||||
|
Loading…
x
Reference in New Issue
Block a user