Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 01:02:03 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: ebdc39c9e9c7 - stable/13 - kern_openat(): rename fd argument to dirfd
Message-ID:  <202401310102.40V123BT096798@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

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

commit ebdc39c9e9c7a9682c28691d3a06f4fff043af3f
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:33 +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 830f0d008aca..3c45610a8853 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1104,8 +1104,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;
@@ -1152,7 +1152,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, td);
+	    pathseg, path, dirfd, &rights, td);
 	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 aabcb19448cc..02e5b1a4c077 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -228,7 +228,7 @@ int     kern_nanosleep(struct thread *td, struct timespec *rqt,
 int	kern_ntp_adjtime(struct thread *td, struct timex *ntv, int *retvalp);
 int	kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap,
 	    long *ploff);
-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?202401310102.40V123BT096798>