diff options
Diffstat (limited to 'pkg/sentry/fs/sys')
-rw-r--r-- | pkg/sentry/fs/sys/BUILD | 24 | ||||
-rw-r--r-- | pkg/sentry/fs/sys/sys_state_autogen.go | 61 |
2 files changed, 61 insertions, 24 deletions
diff --git a/pkg/sentry/fs/sys/BUILD b/pkg/sentry/fs/sys/BUILD deleted file mode 100644 index fdbc5f912..000000000 --- a/pkg/sentry/fs/sys/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -package(licenses = ["notice"]) - -go_library( - name = "sys", - srcs = [ - "device.go", - "devices.go", - "fs.go", - "sys.go", - ], - visibility = ["//pkg/sentry:internal"], - deps = [ - "//pkg/abi/linux", - "//pkg/context", - "//pkg/hostarch", - "//pkg/sentry/device", - "//pkg/sentry/fs", - "//pkg/sentry/fs/fsutil", - "//pkg/sentry/fs/ramfs", - "//pkg/sentry/kernel", - ], -) diff --git a/pkg/sentry/fs/sys/sys_state_autogen.go b/pkg/sentry/fs/sys/sys_state_autogen.go new file mode 100644 index 000000000..9c4f22243 --- /dev/null +++ b/pkg/sentry/fs/sys/sys_state_autogen.go @@ -0,0 +1,61 @@ +// automatically generated by stateify. + +package sys + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (c *cpunum) StateTypeName() string { + return "pkg/sentry/fs/sys.cpunum" +} + +func (c *cpunum) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + "InodeStaticFileGetter", + } +} + +func (c *cpunum) beforeSave() {} + +// +checklocksignore +func (c *cpunum) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.InodeSimpleAttributes) + stateSinkObject.Save(1, &c.InodeStaticFileGetter) +} + +func (c *cpunum) afterLoad() {} + +// +checklocksignore +func (c *cpunum) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.InodeSimpleAttributes) + stateSourceObject.Load(1, &c.InodeStaticFileGetter) +} + +func (f *filesystem) StateTypeName() string { + return "pkg/sentry/fs/sys.filesystem" +} + +func (f *filesystem) StateFields() []string { + return []string{} +} + +func (f *filesystem) beforeSave() {} + +// +checklocksignore +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() +} + +func (f *filesystem) afterLoad() {} + +// +checklocksignore +func (f *filesystem) StateLoad(stateSourceObject state.Source) { +} + +func init() { + state.Register((*cpunum)(nil)) + state.Register((*filesystem)(nil)) +} |