diff options
Diffstat (limited to 'pkg/sentry/fsimpl/pipefs')
-rw-r--r-- | pkg/sentry/fsimpl/pipefs/BUILD | 21 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go | 105 |
2 files changed, 105 insertions, 21 deletions
diff --git a/pkg/sentry/fsimpl/pipefs/BUILD b/pkg/sentry/fsimpl/pipefs/BUILD deleted file mode 100644 index 5950a2d59..000000000 --- a/pkg/sentry/fsimpl/pipefs/BUILD +++ /dev/null @@ -1,21 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -licenses(["notice"]) - -go_library( - name = "pipefs", - srcs = ["pipefs.go"], - visibility = ["//pkg/sentry:internal"], - deps = [ - "//pkg/abi/linux", - "//pkg/context", - "//pkg/fspath", - "//pkg/sentry/fsimpl/kernfs", - "//pkg/sentry/kernel/auth", - "//pkg/sentry/kernel/pipe", - "//pkg/sentry/kernel/time", - "//pkg/sentry/vfs", - "//pkg/syserror", - "//pkg/usermem", - ], -) diff --git a/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go new file mode 100644 index 000000000..384af5bf0 --- /dev/null +++ b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go @@ -0,0 +1,105 @@ +// automatically generated by stateify. + +package pipefs + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (f *filesystemType) StateTypeName() string { + return "pkg/sentry/fsimpl/pipefs.filesystemType" +} + +func (f *filesystemType) StateFields() []string { + return []string{} +} + +func (f *filesystemType) beforeSave() {} + +func (f *filesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() +} + +func (f *filesystemType) afterLoad() {} + +func (f *filesystemType) StateLoad(stateSourceObject state.Source) { +} + +func (f *filesystem) StateTypeName() string { + return "pkg/sentry/fsimpl/pipefs.filesystem" +} + +func (f *filesystem) StateFields() []string { + return []string{ + "Filesystem", + "devMinor", + } +} + +func (f *filesystem) beforeSave() {} + +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) +} + +func (f *filesystem) afterLoad() {} + +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) +} + +func (i *inode) StateTypeName() string { + return "pkg/sentry/fsimpl/pipefs.inode" +} + +func (i *inode) StateFields() []string { + return []string{ + "InodeNotDirectory", + "InodeNotSymlink", + "InodeNoopRefCount", + "locks", + "pipe", + "ino", + "uid", + "gid", + "ctime", + } +} + +func (i *inode) beforeSave() {} + +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeNotDirectory) + stateSinkObject.Save(1, &i.InodeNotSymlink) + stateSinkObject.Save(2, &i.InodeNoopRefCount) + stateSinkObject.Save(3, &i.locks) + stateSinkObject.Save(4, &i.pipe) + stateSinkObject.Save(5, &i.ino) + stateSinkObject.Save(6, &i.uid) + stateSinkObject.Save(7, &i.gid) + stateSinkObject.Save(8, &i.ctime) +} + +func (i *inode) afterLoad() {} + +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeNotDirectory) + stateSourceObject.Load(1, &i.InodeNotSymlink) + stateSourceObject.Load(2, &i.InodeNoopRefCount) + stateSourceObject.Load(3, &i.locks) + stateSourceObject.Load(4, &i.pipe) + stateSourceObject.Load(5, &i.ino) + stateSourceObject.Load(6, &i.uid) + stateSourceObject.Load(7, &i.gid) + stateSourceObject.Load(8, &i.ctime) +} + +func init() { + state.Register((*filesystemType)(nil)) + state.Register((*filesystem)(nil)) + state.Register((*inode)(nil)) +} |