aboutsummaryrefslogtreecommitdiff
path: root/src/os/root_openat.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/root_openat.go')
-rw-r--r--src/os/root_openat.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/root_openat.go b/src/os/root_openat.go
index 7f6619bab4..a03208b4c1 100644
--- a/src/os/root_openat.go
+++ b/src/os/root_openat.go
@@ -74,6 +74,16 @@ func rootMkdir(r *Root, name string, perm FileMode) error {
return err
}
+func rootRemove(r *Root, name string) error {
+ _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) {
+ return struct{}{}, removeat(parent, name)
+ })
+ if err != nil {
+ return &PathError{Op: "removeat", Path: name, Err: err}
+ }
+ return err
+}
+
// doInRoot performs an operation on a path in a Root.
//
// It opens the directory containing the final element of the path,