mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-30 22:06:37 -04:00
unix: add flags parameter to Unlinkat
The flags parameter was added in https://golang.org/cl/7917. In that CL the reviewers discussed adding UnlinkAt and changing Unlinkat, and opted for the latter. Unfortunately, I then undid that in https://golang.org/cl/10032, which was a backport of (among others) https://golang.org/cl/5837. I didn't notice that in the syscall package 5837 removed Unlinkat with two parameters, but the port to the x/sys/unix package removed Unlinkat with three parameters. Argh. This CL effectively restores 7917, by adding the parameter back. Fixes golang/go#9923. Change-Id: I8fe218ac637d0eb0346b63b596666671374bd19f Reviewed-on: https://go-review.googlesource.com/18981 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
@@ -86,8 +86,8 @@ func Unlink(path string) error {
|
||||
|
||||
//sys unlinkat(dirfd int, path string, flags int) (err error)
|
||||
|
||||
func Unlinkat(dirfd int, path string) error {
|
||||
return unlinkat(dirfd, path, 0)
|
||||
func Unlinkat(dirfd int, path string, flags int) error {
|
||||
return unlinkat(dirfd, path, flags)
|
||||
}
|
||||
|
||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||
|
||||
Reference in New Issue
Block a user