git: fdd30e0670d1 - stable/15 - pathconf: Define a new name called _PC_CASE_INSENSITIVE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 08 Nov 2025 01:16:56 UTC
The branch stable/15 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=fdd30e0670d1e7f329042a312aa01d6623f68567
commit fdd30e0670d1e7f329042a312aa01d6623f68567
Author: Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2025-10-25 20:37:35 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2025-11-08 02:13:49 +0000
pathconf: Define a new name called _PC_CASE_INSENSITIVE
Some FreeBSD file systems (msdosfs and optionally ZFS)
handle case insensitive file name lookup.
NFS (v3 and 4) provide an attribute to indicate this
capability, but without this patch, the NFS server does
not know if the file system does support this.
This patch adds the pathconf name_PC_CASE_INSENSITIVE
that can be used by the NFS server or user programs to
check for this feature.
(cherry picked from commit d6864221d88425a079f76ca106f30812c671ca9a)
---
sys/fs/msdosfs/msdosfs_vnops.c | 3 +++
sys/kern/vfs_default.c | 1 +
sys/sys/unistd.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index 33e0d94954d7..6dfac1b4ebd2 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1944,6 +1944,9 @@ msdosfs_pathconf(struct vop_pathconf_args *ap)
case _PC_HAS_HIDDENSYSTEM:
*ap->a_retval = 1;
return (0);
+ case _PC_CASE_INSENSITIVE:
+ *ap->a_retval = 1;
+ return (0);
default:
return (vop_stdpathconf(ap));
}
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 85f67731e1cc..71fe0e62d076 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -458,6 +458,7 @@ vop_stdpathconf(struct vop_pathconf_args *ap)
case _PC_HAS_NAMEDATTR:
case _PC_HAS_HIDDENSYSTEM:
case _PC_CLONE_BLKSIZE:
+ case _PC_CASE_INSENSITIVE:
*ap->a_retval = 0;
return (0);
default:
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h
index 5743dc1c8033..29adf6b59425 100644
--- a/sys/sys/unistd.h
+++ b/sys/sys/unistd.h
@@ -160,6 +160,7 @@
#define _PC_XATTR_EXISTS _PC_HAS_NAMEDATTR /* Solaris Compatible */
#define _PC_HAS_HIDDENSYSTEM 68
#define _PC_CLONE_BLKSIZE 69
+#define _PC_CASE_INSENSITIVE 70
#endif
/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */