From 2ffda87f2dce71024f72ccff32cbfe29ee676bf8 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 19 Mar 2025 11:15:06 -0700 Subject: os: add Root.Rename For #67002 Change-Id: Ifb1042bc5ceaeea64296763319b24634bbcb0bf0 Reviewed-on: https://go-review.googlesource.com/c/go/+/659416 Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Auto-Submit: Damien Neil --- src/os/root_unix.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/os/root_unix.go') diff --git a/src/os/root_unix.go b/src/os/root_unix.go index a5ca10b0cd..dc22651423 100644 --- a/src/os/root_unix.go +++ b/src/os/root_unix.go @@ -209,6 +209,10 @@ func removeat(fd int, name string) error { return e } +func renameat(oldfd int, oldname string, newfd int, newname string) error { + return unix.Renameat(oldfd, oldname, newfd, newname) +} + // checkSymlink resolves the symlink name in parent, // and returns errSymlink with the link contents. // -- cgit v1.3