Date: Wed, 31 Jan 2024 00:46:01 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6a5396c1c682 - stable/14 - kern_openat(): rename fd argument to dirfd Message-ID: <202401310046.40V0k114063179@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a5396c1c682b71e6dc5e8e959860f78ad9aa550 commit 6a5396c1c682b71e6dc5e8e959860f78ad9aa550 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-01-20 21:41:12 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-01-30 20:24:41 +0000 kern_openat(): rename fd argument to dirfd (cherry picked from commit 2a284076ecb4d22928b78249070efa46153666ff) --- 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 d735a8a4929b..2fac2bd46a15 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1113,8 +1113,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; @@ -1161,7 +1161,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 0480eda2fca4..294ff6ef00b9 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401310046.40V0k114063179>