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 | 57 |
2 files changed, 57 insertions, 24 deletions
diff --git a/pkg/sentry/fs/sys/BUILD b/pkg/sentry/fs/sys/BUILD deleted file mode 100644 index f2e8b9932..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/sentry/device", - "//pkg/sentry/fs", - "//pkg/sentry/fs/fsutil", - "//pkg/sentry/fs/ramfs", - "//pkg/sentry/kernel", - "//pkg/usermem", - ], -) 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..71e08a167 --- /dev/null +++ b/pkg/sentry/fs/sys/sys_state_autogen.go @@ -0,0 +1,57 @@ +// automatically generated by stateify. + +package sys + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (x *cpunum) StateTypeName() string { + return "pkg/sentry/fs/sys.cpunum" +} + +func (x *cpunum) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + "InodeStaticFileGetter", + } +} + +func (x *cpunum) beforeSave() {} + +func (x *cpunum) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) + m.Save(1, &x.InodeStaticFileGetter) +} + +func (x *cpunum) afterLoad() {} + +func (x *cpunum) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) + m.Load(1, &x.InodeStaticFileGetter) +} + +func (x *filesystem) StateTypeName() string { + return "pkg/sentry/fs/sys.filesystem" +} + +func (x *filesystem) StateFields() []string { + return []string{} +} + +func (x *filesystem) beforeSave() {} + +func (x *filesystem) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *filesystem) afterLoad() {} + +func (x *filesystem) StateLoad(m state.Source) { +} + +func init() { + state.Register((*cpunum)(nil)) + state.Register((*filesystem)(nil)) +} |