summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsbridge/fsbridge_state_autogen.go
blob: d69b50c287acea499c91af7817bd1139840caab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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))
}