summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/vfs_state_autogen.go
blob: be27d746f1dc6181ff863f17efe0da257e586a40 (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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
// automatically generated by stateify.

package vfs

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

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

func (x *Dentry) afterLoad() {}
func (x *Dentry) load(m state.Map) {
	m.Load("dead", &x.dead)
	m.Load("mounts", &x.mounts)
	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 *eventList) beforeSave() {}
func (x *eventList) save(m state.Map) {
	x.beforeSave()
	m.Save("head", &x.head)
	m.Save("tail", &x.tail)
}

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

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

func (x *eventEntry) afterLoad() {}
func (x *eventEntry) 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("fsType", &x.fsType)
	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("fsType", &x.fsType)
	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 *Inotify) beforeSave() {}
func (x *Inotify) save(m state.Map) {
	x.beforeSave()
	m.Save("vfsfd", &x.vfsfd)
	m.Save("FileDescriptionDefaultImpl", &x.FileDescriptionDefaultImpl)
	m.Save("DentryMetadataFileDescriptionImpl", &x.DentryMetadataFileDescriptionImpl)
	m.Save("NoLockFD", &x.NoLockFD)
	m.Save("id", &x.id)
	m.Save("events", &x.events)
	m.Save("scratch", &x.scratch)
	m.Save("nextWatchMinusOne", &x.nextWatchMinusOne)
	m.Save("watches", &x.watches)
}

func (x *Inotify) afterLoad() {}
func (x *Inotify) load(m state.Map) {
	m.Load("vfsfd", &x.vfsfd)
	m.Load("FileDescriptionDefaultImpl", &x.FileDescriptionDefaultImpl)
	m.Load("DentryMetadataFileDescriptionImpl", &x.DentryMetadataFileDescriptionImpl)
	m.Load("NoLockFD", &x.NoLockFD)
	m.Load("id", &x.id)
	m.Load("events", &x.events)
	m.Load("scratch", &x.scratch)
	m.Load("nextWatchMinusOne", &x.nextWatchMinusOne)
	m.Load("watches", &x.watches)
}

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

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

func (x *Watch) beforeSave() {}
func (x *Watch) save(m state.Map) {
	x.beforeSave()
	m.Save("owner", &x.owner)
	m.Save("wd", &x.wd)
	m.Save("target", &x.target)
	m.Save("mask", &x.mask)
}

func (x *Watch) afterLoad() {}
func (x *Watch) load(m state.Map) {
	m.Load("owner", &x.owner)
	m.Load("wd", &x.wd)
	m.Load("target", &x.target)
	m.Load("mask", &x.mask)
}

func (x *Event) beforeSave() {}
func (x *Event) save(m state.Map) {
	x.beforeSave()
	m.Save("eventEntry", &x.eventEntry)
	m.Save("wd", &x.wd)
	m.Save("mask", &x.mask)
	m.Save("cookie", &x.cookie)
	m.Save("len", &x.len)
	m.Save("name", &x.name)
}

func (x *Event) afterLoad() {}
func (x *Event) load(m state.Map) {
	m.Load("eventEntry", &x.eventEntry)
	m.Load("wd", &x.wd)
	m.Load("mask", &x.mask)
	m.Load("cookie", &x.cookie)
	m.Load("len", &x.len)
	m.Load("name", &x.name)
}

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("ID", &x.ID)
	m.Save("Flags", &x.Flags)
	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("ID", &x.ID)
	m.Load("Flags", &x.Flags)
	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("Owner", &x.Owner)
	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("Owner", &x.Owner)
	m.Load("root", &x.root)
	m.Load("refs", &x.refs)
	m.Load("mountpoints", &x.mountpoints)
}

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("lastMountID", &x.lastMountID)
	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("lastMountID", &x.lastMountID)
	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.eventList", (*eventList)(nil), state.Fns{Save: (*eventList).save, Load: (*eventList).load})
	state.Register("pkg/sentry/vfs.eventEntry", (*eventEntry)(nil), state.Fns{Save: (*eventEntry).save, Load: (*eventEntry).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.Inotify", (*Inotify)(nil), state.Fns{Save: (*Inotify).save, Load: (*Inotify).load})
	state.Register("pkg/sentry/vfs.Watches", (*Watches)(nil), state.Fns{Save: (*Watches).save, Load: (*Watches).load})
	state.Register("pkg/sentry/vfs.Watch", (*Watch)(nil), state.Fns{Save: (*Watch).save, Load: (*Watch).load})
	state.Register("pkg/sentry/vfs.Event", (*Event)(nil), state.Fns{Save: (*Event).save, Load: (*Event).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.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})
}