summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/sys/sys.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/sys/sys.go')
-rw-r--r--pkg/sentry/fs/sys/sys.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/pkg/sentry/fs/sys/sys.go b/pkg/sentry/fs/sys/sys.go
index 7cc1942c7..c5b56fe69 100644
--- a/pkg/sentry/fs/sys/sys.go
+++ b/pkg/sentry/fs/sys/sys.go
@@ -22,13 +22,6 @@ import (
"gvisor.googlesource.com/gvisor/pkg/sentry/usermem"
)
-// sys is a root sys node.
-//
-// +stateify savable
-type sys struct {
- ramfs.Dir
-}
-
func newFile(node fs.InodeOperations, msrc *fs.MountSource) *fs.Inode {
sattr := fs.StableAttr{
DeviceID: sysfsDevice.DeviceID(),
@@ -40,8 +33,7 @@ func newFile(node fs.InodeOperations, msrc *fs.MountSource) *fs.Inode {
}
func newDir(ctx context.Context, msrc *fs.MountSource, contents map[string]*fs.Inode) *fs.Inode {
- d := &sys{}
- d.InitDir(ctx, contents, fs.RootOwner, fs.FilePermsFromMode(0555))
+ d := ramfs.NewDir(ctx, contents, fs.RootOwner, fs.FilePermsFromMode(0555))
return fs.NewInode(d, msrc, fs.StableAttr{
DeviceID: sysfsDevice.DeviceID(),
InodeID: sysfsDevice.NextIno(),