summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/vfs_state_autogen.go
blob: 2436463287af0d78008672819e70af3434e5b6ca (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// automatically generated by stateify.

// +build go1.12
// +build !go1.15

package vfs

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (x *Dentry) beforeSave() {}
func (x *Dentry) save(m state.Map) {
	x.beforeSave()
	m.Save("parent", &x.parent)
	m.Save("name", &x.name)
	m.Save("flags", &x.flags)
	m.Save("mounts", &x.mounts)
	m.Save("children", &x.children)
	m.Save("impl", &x.impl)
}

func (x *Dentry) afterLoad() {}
func (x *Dentry) load(m state.Map) {
	m.Load("parent", &x.parent)
	m.Load("name", &x.name)
	m.Load("flags", &x.flags)
	m.Load("mounts", &x.mounts)
	m.Load("children", &x.children)
	m.Load("impl", &x.impl)
}

func (x *registeredDevice) beforeSave() {}
func (x *registeredDevice) save(m state.Map) {
	x.beforeSave()
	m.Save("dev", &x.dev)
	m.Save("opts", &x.opts)
}

func (x *registeredDevice) afterLoad() {}
func (x *registeredDevice) load(m state.Map) {
	m.Load("dev", &x.dev)
	m.Load("opts", &x.opts)
}

func (x *RegisterDeviceOptions) beforeSave() {}
func (x *RegisterDeviceOptions) save(m state.Map) {
	x.beforeSave()
	m.Save("GroupName", &x.GroupName)
}

func (x *RegisterDeviceOptions) afterLoad() {}
func (x *RegisterDeviceOptions) load(m state.Map) {
	m.Load("GroupName", &x.GroupName)
}

func (x *epollInterestList) beforeSave() {}
func (x *epollInterestList) save(m state.Map) {
	x.beforeSave()
	m.Save("head", &x.head)
	m.Save("tail", &x.tail)
}

func (x *epollInterestList) afterLoad() {}
func (x *epollInterestList) load(m state.Map) {
	m.Load("head", &x.head)
	m.Load("tail", &x.tail)
}

func (x *epollInterestEntry) beforeSave() {}
func (x *epollInterestEntry) save(m state.Map) {
	x.beforeSave()
	m.Save("next", &x.next)
	m.Save("prev", &x.prev)
}

func (x *epollInterestEntry) afterLoad() {}
func (x *epollInterestEntry) load(m state.Map) {
	m.Load("next", &x.next)
	m.Load("prev", &x.prev)
}

func (x *Filesystem) beforeSave() {}
func (x *Filesystem) save(m state.Map) {
	x.beforeSave()
	m.Save("refs", &x.refs)
	m.Save("vfs", &x.vfs)
	m.Save("impl", &x.impl)
}

func (x *Filesystem) afterLoad() {}
func (x *Filesystem) load(m state.Map) {
	m.Load("refs", &x.refs)
	m.Load("vfs", &x.vfs)
	m.Load("impl", &x.impl)
}

func (x *registeredFilesystemType) beforeSave() {}
func (x *registeredFilesystemType) save(m state.Map) {
	x.beforeSave()
	m.Save("fsType", &x.fsType)
	m.Save("opts", &x.opts)
}

func (x *registeredFilesystemType) afterLoad() {}
func (x *registeredFilesystemType) load(m state.Map) {
	m.Load("fsType", &x.fsType)
	m.Load("opts", &x.opts)
}

func (x *Mount) beforeSave() {}
func (x *Mount) save(m state.Map) {
	x.beforeSave()
	m.Save("vfs", &x.vfs)
	m.Save("fs", &x.fs)
	m.Save("root", &x.root)
	m.Save("key", &x.key)
	m.Save("ns", &x.ns)
	m.Save("refs", &x.refs)
	m.Save("children", &x.children)
	m.Save("umounted", &x.umounted)
	m.Save("writers", &x.writers)
}

func (x *Mount) afterLoad() {}
func (x *Mount) load(m state.Map) {
	m.Load("vfs", &x.vfs)
	m.Load("fs", &x.fs)
	m.Load("root", &x.root)
	m.Load("key", &x.key)
	m.Load("ns", &x.ns)
	m.Load("refs", &x.refs)
	m.Load("children", &x.children)
	m.Load("umounted", &x.umounted)
	m.Load("writers", &x.writers)
}

func (x *MountNamespace) beforeSave() {}
func (x *MountNamespace) save(m state.Map) {
	x.beforeSave()
	m.Save("root", &x.root)
	m.Save("refs", &x.refs)
	m.Save("mountpoints", &x.mountpoints)
}

func (x *MountNamespace) afterLoad() {}
func (x *MountNamespace) load(m state.Map) {
	m.Load("root", &x.root)
	m.Load("refs", &x.refs)
	m.Load("mountpoints", &x.mountpoints)
}

func (x *mountTable) beforeSave() {}
func (x *mountTable) save(m state.Map) {
	x.beforeSave()
	m.Save("seed", &x.seed)
	m.Save("size", &x.size)
}

func (x *mountTable) afterLoad() {}
func (x *mountTable) load(m state.Map) {
	m.Load("seed", &x.seed)
	m.Load("size", &x.size)
}

func (x *VirtualFilesystem) beforeSave() {}
func (x *VirtualFilesystem) save(m state.Map) {
	x.beforeSave()
	m.Save("mounts", &x.mounts)
	m.Save("mountpoints", &x.mountpoints)
	m.Save("anonMount", &x.anonMount)
	m.Save("devices", &x.devices)
	m.Save("anonBlockDevMinorNext", &x.anonBlockDevMinorNext)
	m.Save("anonBlockDevMinor", &x.anonBlockDevMinor)
	m.Save("fsTypes", &x.fsTypes)
	m.Save("filesystems", &x.filesystems)
}

func (x *VirtualFilesystem) afterLoad() {}
func (x *VirtualFilesystem) load(m state.Map) {
	m.Load("mounts", &x.mounts)
	m.Load("mountpoints", &x.mountpoints)
	m.Load("anonMount", &x.anonMount)
	m.Load("devices", &x.devices)
	m.Load("anonBlockDevMinorNext", &x.anonBlockDevMinorNext)
	m.Load("anonBlockDevMinor", &x.anonBlockDevMinor)
	m.Load("fsTypes", &x.fsTypes)
	m.Load("filesystems", &x.filesystems)
}

func (x *VirtualDentry) beforeSave() {}
func (x *VirtualDentry) save(m state.Map) {
	x.beforeSave()
	m.Save("mount", &x.mount)
	m.Save("dentry", &x.dentry)
}

func (x *VirtualDentry) afterLoad() {}
func (x *VirtualDentry) load(m state.Map) {
	m.Load("mount", &x.mount)
	m.Load("dentry", &x.dentry)
}

func init() {
	state.Register("pkg/sentry/vfs.Dentry", (*Dentry)(nil), state.Fns{Save: (*Dentry).save, Load: (*Dentry).load})
	state.Register("pkg/sentry/vfs.registeredDevice", (*registeredDevice)(nil), state.Fns{Save: (*registeredDevice).save, Load: (*registeredDevice).load})
	state.Register("pkg/sentry/vfs.RegisterDeviceOptions", (*RegisterDeviceOptions)(nil), state.Fns{Save: (*RegisterDeviceOptions).save, Load: (*RegisterDeviceOptions).load})
	state.Register("pkg/sentry/vfs.epollInterestList", (*epollInterestList)(nil), state.Fns{Save: (*epollInterestList).save, Load: (*epollInterestList).load})
	state.Register("pkg/sentry/vfs.epollInterestEntry", (*epollInterestEntry)(nil), state.Fns{Save: (*epollInterestEntry).save, Load: (*epollInterestEntry).load})
	state.Register("pkg/sentry/vfs.Filesystem", (*Filesystem)(nil), state.Fns{Save: (*Filesystem).save, Load: (*Filesystem).load})
	state.Register("pkg/sentry/vfs.registeredFilesystemType", (*registeredFilesystemType)(nil), state.Fns{Save: (*registeredFilesystemType).save, Load: (*registeredFilesystemType).load})
	state.Register("pkg/sentry/vfs.Mount", (*Mount)(nil), state.Fns{Save: (*Mount).save, Load: (*Mount).load})
	state.Register("pkg/sentry/vfs.MountNamespace", (*MountNamespace)(nil), state.Fns{Save: (*MountNamespace).save, Load: (*MountNamespace).load})
	state.Register("pkg/sentry/vfs.mountTable", (*mountTable)(nil), state.Fns{Save: (*mountTable).save, Load: (*mountTable).load})
	state.Register("pkg/sentry/vfs.VirtualFilesystem", (*VirtualFilesystem)(nil), state.Fns{Save: (*VirtualFilesystem).save, Load: (*VirtualFilesystem).load})
	state.Register("pkg/sentry/vfs.VirtualDentry", (*VirtualDentry)(nil), state.Fns{Save: (*VirtualDentry).save, Load: (*VirtualDentry).load})
}