git: 09da0899551a - main - getfhat: Add missing 'const' to path argument

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a679ece.30dc1.defd287__18089.7904605203$1785175788$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=09da0899551a63ce3eb841e4ce4385b6e48dd4ec

commit 09da0899551a63ce3eb841e4ce4385b6e48dd4ec
Author:     John Baldwin <[email protected]>
AuthorDate: 2026-07-27 18:09:03 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2026-07-27 18:09:03 +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
---
 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 4bc5385f76e7..64145f2c3e57 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -3158,7 +3158,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 dc4a49828bbe..b8b65a81369f 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1245,7 +1245,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 *);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.