git: 3d13a659c46d - stable/14 - getfhat: Add missing 'const' to path argument

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 09 Oct 2026 00:20:40 UTC
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=3d13a659c46ddec2485ad40affc39bc319bd7972

commit 3d13a659c46ddec2485ad40affc39bc319bd7972
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-07-27 18:09:03 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-10-08 18:34:37 +0000

    getfhat: Add missing 'const' to path argument
    
    This matches the documented prototype and avoids spurious
    -Wincompatible-pointer-types-discards-qualifiers warnings when passing
    a constant pathname.
    
    Sponsored by:   AFRL, DARPA
    
    (cherry picked from commit 09da0899551a63ce3eb841e4ce4385b6e48dd4ec)
---
 sys/kern/syscalls.master | 2 +-
 sys/sys/mount.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 81b27d583c8c..b2e094d778f6 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -3173,7 +3173,7 @@
 564	AUE_NULL	STD {
 		int getfhat(
 		    int fd,
-		    _In_z_ char *path,
+		    _In_z_ const char *path,
 		    _Out_ struct fhandle *fhp,
 		    int flags
 		);
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index f7e756e03c84..2969aa771c24 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1200,7 +1200,7 @@ int	fhstat(const struct fhandle *, struct stat *);
 int	fhstatfs(const struct fhandle *, struct statfs *);
 int	fstatfs(int, struct statfs *);
 int	getfh(const char *, fhandle_t *);
-int	getfhat(int, char *, struct fhandle *, int);
+int	getfhat(int, const char *, struct fhandle *, int);
 int	getfsstat(struct statfs *, long, int);
 int	getmntinfo(struct statfs **, int);
 int	lgetfh(const char *, fhandle_t *);