git: 2a284076ecb4 - main - kern_openat(): rename fd argument to dirfd
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Jan 2024 05:13:34 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=2a284076ecb4d22928b78249070efa46153666ff
commit 2a284076ecb4d22928b78249070efa46153666ff
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-20 21:41:12 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-24 05:13:25 +0000
kern_openat(): rename fd argument to dirfd
Reviewed by: markj, pjd
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43529
---
sys/kern/vfs_syscalls.c | 6 +++---
sys/sys/syscallsubr.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index c739b5d5beaa..cccb24257e11 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1111,8 +1111,8 @@ sys_openat(struct thread *td, struct openat_args *uap)
}
int
-kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg,
- int flags, int mode)
+kern_openat(struct thread *td, int dirfd, const char *path,
+ enum uio_seg pathseg, int flags, int mode)
{
struct proc *p = td->td_proc;
struct filedesc *fdp;
@@ -1159,7 +1159,7 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg,
fp->f_flag = flags & FMASK;
cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT;
NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | AUDITVNODE1 | WANTIOCTLCAPS,
- pathseg, path, fd, &rights);
+ pathseg, path, dirfd, &rights);
td->td_dupfd = -1; /* XXX check for fdopen */
error = vn_open_cred(&nd, &flags, cmode, VN_OPEN_WANTIOCTLCAPS,
td->td_ucred, fp);
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h
index 2c3059b27c82..50dc3ad7d126 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -251,7 +251,7 @@ int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap,
long *ploff);
int kern_ommap(struct thread *td, uintptr_t hint, int len, int oprot,
int oflags, int fd, long pos);
-int kern_openat(struct thread *td, int fd, const char *path,
+int kern_openat(struct thread *td, int dirfd, const char *path,
enum uio_seg pathseg, int flags, int mode);
int kern_pathconf(struct thread *td, const char *path,
enum uio_seg pathseg, int name, u_long flags, long *valuep);