From nobody Wed Jan 24 05:13:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXDG4G5Xz57T1d; Wed, 24 Jan 2024 05:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKXDG3Nsyz4dwG; Wed, 24 Jan 2024 05:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3oHtDGoexQKgVnnHlXZi0cPrSJcCDa2AWZwLqfslpI=; b=j7fc89NPF+tSOXYBTWynd7lsGg4Sjri8B8FuEtXb5kdkFTPcIzoj0PXFIG/TCW2Yl20Z27 cfe9el4vNXSHgj4VFjFz5MXmynWhEt8ABOjZU+J3mwPWbqIDKsHBH294Pr+wV9JvbXe2wq udDMha5ZY9g6o5594GFhxqDBpx4rw4Q4uFuxpHnoyT2XKYRtZkKqJlyFcvsz+Es9iKElXs 0NVLsd5cnowQ6rLwb13N9kHpeJKLAzSHWlOo9I1tVxfQvZHSmkKa6IIDiiZeaxV/UBt0MI /AHymlHDyV8tygbXsq3boy46k3cdEmB0DTFuyxcp/3XodZDeEew+yrRyWv+BTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3oHtDGoexQKgVnnHlXZi0cPrSJcCDa2AWZwLqfslpI=; b=lVlNXZnInAXsovRRwJGa7nEfQYj8mFxEOGauOf0QUSG60WLNKKstJsqXuPoe4NEBAsPkEr 2Kk8Vu+Oe6LofTgwoIq0/OCzvobXEhZEwKn2GHjDiIEhzbIajNjE0efH+NAiGYSgBWt8eT 8qmtUbK7JDOiNCehW/pXA5vnvTwqQchwZC/0FBmyK+FZpVw1T03McRrREUaO9S7pVPsWL9 rkE9zVEA53qENMNgTPULFswVYDmHnh3RJsVQ8xyY2rKfrnPLGk3sSvjOKuITpXgirhKJEq WbCaJOVhfOety3WwNzD4Fxbke5sPFf8NaC9pW+X1ULrplshM5JuwLrMg+Z+nZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073214; a=rsa-sha256; cv=none; b=kstX1Ni0+F3aDfsoovFz/wn+CXb3dLCdZ0HknJB3cO6SO7gyUwZEVoAFO3nZY8UupWE6+V OK34RfI1lxnwPZOl5NZUdu3CFK0M1dLrlB0uDTQbnUowsJpJBoSqALuXEBMgUoPn9tN4By tx26qG5yR8E9uL6GfqoQl/LFBw9Ks0B7x4Cl0C0inauhq2ldIsbLs7HEWkcviQUdhmRXOG 4zwuEfHg+f4W0RsLMEIEeVx8OJbe9huOLpgJTK8zH0F+gjGZdejAWOxxy+J/Ob5XK2JNtT iwO7z6ChnhNStNi3CjVyMGbowh42GVNrfxyve3b6Lqvw1gyjkD9cjackU3bh6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXDG2S4yz110p; Wed, 24 Jan 2024 05:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40O5DYmT041718; Wed, 24 Jan 2024 05:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5DYkV041715; Wed, 24 Jan 2024 05:13:34 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:13:34 GMT Message-Id: <202401240513.40O5DYkV041715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2a284076ecb4 - main - kern_openat(): rename fd argument to dirfd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a284076ecb4d22928b78249070efa46153666ff Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2a284076ecb4d22928b78249070efa46153666ff commit 2a284076ecb4d22928b78249070efa46153666ff Author: Konstantin Belousov AuthorDate: 2024-01-20 21:41:12 +0000 Commit: Konstantin Belousov 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);