diff options
Diffstat (limited to 'pkg/sentry/fs/dev')
-rw-r--r-- | pkg/sentry/fs/dev/BUILD | 40 | ||||
-rw-r--r-- | pkg/sentry/fs/dev/dev_state_autogen.go | 298 |
2 files changed, 298 insertions, 40 deletions
diff --git a/pkg/sentry/fs/dev/BUILD b/pkg/sentry/fs/dev/BUILD deleted file mode 100644 index 9379a4d7b..000000000 --- a/pkg/sentry/fs/dev/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -package(licenses = ["notice"]) - -go_library( - name = "dev", - srcs = [ - "dev.go", - "device.go", - "fs.go", - "full.go", - "net_tun.go", - "null.go", - "random.go", - "tty.go", - ], - visibility = ["//pkg/sentry:internal"], - deps = [ - "//pkg/abi/linux", - "//pkg/context", - "//pkg/rand", - "//pkg/safemem", - "//pkg/sentry/arch", - "//pkg/sentry/device", - "//pkg/sentry/fs", - "//pkg/sentry/fs/fsutil", - "//pkg/sentry/fs/ramfs", - "//pkg/sentry/fs/tmpfs", - "//pkg/sentry/inet", - "//pkg/sentry/kernel", - "//pkg/sentry/memmap", - "//pkg/sentry/mm", - "//pkg/sentry/pgalloc", - "//pkg/sentry/socket/netstack", - "//pkg/syserror", - "//pkg/tcpip/link/tun", - "//pkg/usermem", - "//pkg/waiter", - ], -) diff --git a/pkg/sentry/fs/dev/dev_state_autogen.go b/pkg/sentry/fs/dev/dev_state_autogen.go new file mode 100644 index 000000000..48a60e45f --- /dev/null +++ b/pkg/sentry/fs/dev/dev_state_autogen.go @@ -0,0 +1,298 @@ +// automatically generated by stateify. + +package dev + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (x *filesystem) StateTypeName() string { + return "pkg/sentry/fs/dev.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 (x *fullDevice) StateTypeName() string { + return "pkg/sentry/fs/dev.fullDevice" +} + +func (x *fullDevice) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + } +} + +func (x *fullDevice) beforeSave() {} + +func (x *fullDevice) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) +} + +func (x *fullDevice) afterLoad() {} + +func (x *fullDevice) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) +} + +func (x *fullFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.fullFileOperations" +} + +func (x *fullFileOperations) StateFields() []string { + return []string{} +} + +func (x *fullFileOperations) beforeSave() {} + +func (x *fullFileOperations) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *fullFileOperations) afterLoad() {} + +func (x *fullFileOperations) StateLoad(m state.Source) { +} + +func (x *netTunInodeOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.netTunInodeOperations" +} + +func (x *netTunInodeOperations) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + } +} + +func (x *netTunInodeOperations) beforeSave() {} + +func (x *netTunInodeOperations) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) +} + +func (x *netTunInodeOperations) afterLoad() {} + +func (x *netTunInodeOperations) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) +} + +func (x *netTunFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.netTunFileOperations" +} + +func (x *netTunFileOperations) StateFields() []string { + return []string{ + "device", + } +} + +func (x *netTunFileOperations) beforeSave() {} + +func (x *netTunFileOperations) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.device) +} + +func (x *netTunFileOperations) afterLoad() {} + +func (x *netTunFileOperations) StateLoad(m state.Source) { + m.Load(0, &x.device) +} + +func (x *nullDevice) StateTypeName() string { + return "pkg/sentry/fs/dev.nullDevice" +} + +func (x *nullDevice) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + } +} + +func (x *nullDevice) beforeSave() {} + +func (x *nullDevice) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) +} + +func (x *nullDevice) afterLoad() {} + +func (x *nullDevice) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) +} + +func (x *nullFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.nullFileOperations" +} + +func (x *nullFileOperations) StateFields() []string { + return []string{} +} + +func (x *nullFileOperations) beforeSave() {} + +func (x *nullFileOperations) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *nullFileOperations) afterLoad() {} + +func (x *nullFileOperations) StateLoad(m state.Source) { +} + +func (x *zeroDevice) StateTypeName() string { + return "pkg/sentry/fs/dev.zeroDevice" +} + +func (x *zeroDevice) StateFields() []string { + return []string{ + "nullDevice", + } +} + +func (x *zeroDevice) beforeSave() {} + +func (x *zeroDevice) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.nullDevice) +} + +func (x *zeroDevice) afterLoad() {} + +func (x *zeroDevice) StateLoad(m state.Source) { + m.Load(0, &x.nullDevice) +} + +func (x *zeroFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.zeroFileOperations" +} + +func (x *zeroFileOperations) StateFields() []string { + return []string{} +} + +func (x *zeroFileOperations) beforeSave() {} + +func (x *zeroFileOperations) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *zeroFileOperations) afterLoad() {} + +func (x *zeroFileOperations) StateLoad(m state.Source) { +} + +func (x *randomDevice) StateTypeName() string { + return "pkg/sentry/fs/dev.randomDevice" +} + +func (x *randomDevice) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + } +} + +func (x *randomDevice) beforeSave() {} + +func (x *randomDevice) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) +} + +func (x *randomDevice) afterLoad() {} + +func (x *randomDevice) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) +} + +func (x *randomFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.randomFileOperations" +} + +func (x *randomFileOperations) StateFields() []string { + return []string{} +} + +func (x *randomFileOperations) beforeSave() {} + +func (x *randomFileOperations) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *randomFileOperations) afterLoad() {} + +func (x *randomFileOperations) StateLoad(m state.Source) { +} + +func (x *ttyInodeOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.ttyInodeOperations" +} + +func (x *ttyInodeOperations) StateFields() []string { + return []string{ + "InodeSimpleAttributes", + } +} + +func (x *ttyInodeOperations) beforeSave() {} + +func (x *ttyInodeOperations) StateSave(m state.Sink) { + x.beforeSave() + m.Save(0, &x.InodeSimpleAttributes) +} + +func (x *ttyInodeOperations) afterLoad() {} + +func (x *ttyInodeOperations) StateLoad(m state.Source) { + m.Load(0, &x.InodeSimpleAttributes) +} + +func (x *ttyFileOperations) StateTypeName() string { + return "pkg/sentry/fs/dev.ttyFileOperations" +} + +func (x *ttyFileOperations) StateFields() []string { + return []string{} +} + +func (x *ttyFileOperations) beforeSave() {} + +func (x *ttyFileOperations) StateSave(m state.Sink) { + x.beforeSave() +} + +func (x *ttyFileOperations) afterLoad() {} + +func (x *ttyFileOperations) StateLoad(m state.Source) { +} + +func init() { + state.Register((*filesystem)(nil)) + state.Register((*fullDevice)(nil)) + state.Register((*fullFileOperations)(nil)) + state.Register((*netTunInodeOperations)(nil)) + state.Register((*netTunFileOperations)(nil)) + state.Register((*nullDevice)(nil)) + state.Register((*nullFileOperations)(nil)) + state.Register((*zeroDevice)(nil)) + state.Register((*zeroFileOperations)(nil)) + state.Register((*randomDevice)(nil)) + state.Register((*randomFileOperations)(nil)) + state.Register((*ttyInodeOperations)(nil)) + state.Register((*ttyFileOperations)(nil)) +} |