summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsbridge
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fsbridge')
-rw-r--r--pkg/sentry/fsbridge/BUILD24
-rw-r--r--pkg/sentry/fsbridge/fsbridge_state_autogen.go118
2 files changed, 118 insertions, 24 deletions
diff --git a/pkg/sentry/fsbridge/BUILD b/pkg/sentry/fsbridge/BUILD
deleted file mode 100644
index 6c798f0bd..000000000
--- a/pkg/sentry/fsbridge/BUILD
+++ /dev/null
@@ -1,24 +0,0 @@
-load("//tools:defs.bzl", "go_library")
-
-licenses(["notice"])
-
-go_library(
- name = "fsbridge",
- srcs = [
- "bridge.go",
- "fs.go",
- "vfs.go",
- ],
- visibility = ["//pkg/sentry:internal"],
- deps = [
- "//pkg/abi/linux",
- "//pkg/context",
- "//pkg/fspath",
- "//pkg/sentry/fs",
- "//pkg/sentry/kernel/auth",
- "//pkg/sentry/memmap",
- "//pkg/sentry/vfs",
- "//pkg/syserror",
- "//pkg/usermem",
- ],
-)
diff --git a/pkg/sentry/fsbridge/fsbridge_state_autogen.go b/pkg/sentry/fsbridge/fsbridge_state_autogen.go
new file mode 100644
index 000000000..d69b50c28
--- /dev/null
+++ b/pkg/sentry/fsbridge/fsbridge_state_autogen.go
@@ -0,0 +1,118 @@
+// automatically generated by stateify.
+
+package fsbridge
+
+import (
+ "gvisor.dev/gvisor/pkg/state"
+)
+
+func (x *fsFile) StateTypeName() string {
+ return "pkg/sentry/fsbridge.fsFile"
+}
+
+func (x *fsFile) StateFields() []string {
+ return []string{
+ "file",
+ }
+}
+
+func (x *fsFile) beforeSave() {}
+
+func (x *fsFile) StateSave(m state.Sink) {
+ x.beforeSave()
+ m.Save(0, &x.file)
+}
+
+func (x *fsFile) afterLoad() {}
+
+func (x *fsFile) StateLoad(m state.Source) {
+ m.Load(0, &x.file)
+}
+
+func (x *fsLookup) StateTypeName() string {
+ return "pkg/sentry/fsbridge.fsLookup"
+}
+
+func (x *fsLookup) StateFields() []string {
+ return []string{
+ "mntns",
+ "root",
+ "workingDir",
+ }
+}
+
+func (x *fsLookup) beforeSave() {}
+
+func (x *fsLookup) StateSave(m state.Sink) {
+ x.beforeSave()
+ m.Save(0, &x.mntns)
+ m.Save(1, &x.root)
+ m.Save(2, &x.workingDir)
+}
+
+func (x *fsLookup) afterLoad() {}
+
+func (x *fsLookup) StateLoad(m state.Source) {
+ m.Load(0, &x.mntns)
+ m.Load(1, &x.root)
+ m.Load(2, &x.workingDir)
+}
+
+func (x *VFSFile) StateTypeName() string {
+ return "pkg/sentry/fsbridge.VFSFile"
+}
+
+func (x *VFSFile) StateFields() []string {
+ return []string{
+ "file",
+ }
+}
+
+func (x *VFSFile) beforeSave() {}
+
+func (x *VFSFile) StateSave(m state.Sink) {
+ x.beforeSave()
+ m.Save(0, &x.file)
+}
+
+func (x *VFSFile) afterLoad() {}
+
+func (x *VFSFile) StateLoad(m state.Source) {
+ m.Load(0, &x.file)
+}
+
+func (x *vfsLookup) StateTypeName() string {
+ return "pkg/sentry/fsbridge.vfsLookup"
+}
+
+func (x *vfsLookup) StateFields() []string {
+ return []string{
+ "mntns",
+ "root",
+ "workingDir",
+ }
+}
+
+func (x *vfsLookup) beforeSave() {}
+
+func (x *vfsLookup) StateSave(m state.Sink) {
+ x.beforeSave()
+ m.Save(0, &x.mntns)
+ m.Save(1, &x.root)
+ m.Save(2, &x.workingDir)
+}
+
+func (x *vfsLookup) afterLoad() {}
+
+func (x *vfsLookup) StateLoad(m state.Source) {
+ m.Load(0, &x.mntns)
+ m.Load(1, &x.root)
+ m.Load(2, &x.workingDir)
+}
+
+func init() {
+ state.Register((*fsFile)(nil))
+ state.Register((*fsLookup)(nil))
+ state.Register((*VFSFile)(nil))
+ state.Register((*vfsLookup)(nil))
+}