The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1f3020067ab3f3c5043d01ea1e3a3d2998a39d4a
commit 1f3020067ab3f3c5043d01ea1e3a3d2998a39d4a Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-02-26 18:30:14 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-03-05 23:46:53 +0000 kern_renameat(9): add flags argument Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55539 --- sys/compat/linux/linux_file.c | 4 ++-- sys/kern/vfs_syscalls.c | 8 ++++---- sys/sys/syscallsubr.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index ca089585bb95..43ccac0308d3 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -811,7 +811,7 @@ linux_rename(struct thread *td, struct linux_rename_args *args) { return (kern_renameat(td, AT_FDCWD, args->from, AT_FDCWD, - args->to, UIO_USERSPACE)); + args->to, UIO_USERSPACE, 0)); } #endif @@ -858,7 +858,7 @@ linux_renameat2(struct thread *td, struct linux_renameat2_args *args) olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; return (kern_renameat(td, olddfd, args->oldname, newdfd, - args->newname, UIO_USERSPACE)); + args->newname, UIO_USERSPACE, 0)); } #ifdef LINUX_LEGACY_SYSCALLS diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index be296f41809e..4409b0295587 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3720,7 +3720,7 @@ sys_rename(struct thread *td, struct rename_args *uap) { return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD, - uap->to, UIO_USERSPACE)); + uap->to, UIO_USERSPACE, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -3736,7 +3736,7 @@ sys_renameat(struct thread *td, struct renameat_args *uap) { return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new, - UIO_USERSPACE)); + UIO_USERSPACE, 0)); } #ifdef MAC @@ -3766,7 +3766,7 @@ kern_renameat_mac(struct thread *td, int oldfd, const char *old, int newfd, int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, - const char *new, enum uio_seg pathseg) + const char *new, enum uio_seg pathseg, u_int flags) { struct mount *mp, *tmp; struct vnode *tvp, *fvp, *tdvp; @@ -3887,7 +3887,7 @@ again1: out: if (error == 0) { error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, - tond.ni_dvp, tond.ni_vp, &tond.ni_cnd, 0); + tond.ni_dvp, tond.ni_vp, &tond.ni_cnd, flags); NDFREE_PNBUF(&fromnd); NDFREE_PNBUF(&tond); } else { diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index a714ecf9412b..8d546428820e 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -305,7 +305,7 @@ int kern_readv(struct thread *td, int fd, struct uio *auio); int kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, struct mbuf **controlp); int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, - const char *new, enum uio_seg pathseg); + const char *new, enum uio_seg pathseg, u_int flags); int kern_sched_getparam(struct thread *td, struct thread *targettd, struct sched_param *param); int kern_sched_getscheduler(struct thread *td, struct thread *targettd,
