summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsbridge/fsbridge_state_autogen.go
blob: a5d0364f03489ed33e24534a38b2682197d3fe08 (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 (f *fsFile) StateTypeName() string {
	return "pkg/sentry/fsbridge.fsFile"
}

func (f *fsFile) StateFields() []string {
	return []string{
		"file",
	}
}

func (f *fsFile) beforeSave() {}

func (f *fsFile) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
	stateSinkObject.Save(0, &f.file)
}

func (f *fsFile) afterLoad() {}

func (f *fsFile) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &f.file)
}

func (l *fsLookup) StateTypeName() string {
	return "pkg/sentry/fsbridge.fsLookup"
}

func (l *fsLookup) StateFields() []string {
	return []string{
		"mntns",
		"root",
		"workingDir",
	}
}

func (l *fsLookup) beforeSave() {}

func (l *fsLookup) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.mntns)
	stateSinkObject.Save(1, &l.root)
	stateSinkObject.Save(2, &l.workingDir)
}

func (l *fsLookup) afterLoad() {}

func (l *fsLookup) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.mntns)
	stateSourceObject.Load(1, &l.root)
	stateSourceObject.Load(2, &l.workingDir)
}

func (f *VFSFile) StateTypeName() string {
	return "pkg/sentry/fsbridge.VFSFile"
}

func (f *VFSFile) StateFields() []string {
	return []string{
		"file",
	}
}

func (f *VFSFile) beforeSave() {}

func (f *VFSFile) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
	stateSinkObject.Save(0, &f.file)
}

func (f *VFSFile) afterLoad() {}

func (f *VFSFile) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &f.file)
}

func (l *vfsLookup) StateTypeName() string {
	return "pkg/sentry/fsbridge.vfsLookup"
}

func (l *vfsLookup) StateFields() []string {
	return []string{
		"mntns",
		"root",
		"workingDir",
	}
}

func (l *vfsLookup) beforeSave() {}

func (l *vfsLookup) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.mntns)
	stateSinkObject.Save(1, &l.root)
	stateSinkObject.Save(2, &l.workingDir)
}

func (l *vfsLookup) afterLoad() {}

func (l *vfsLookup) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.mntns)
	stateSourceObject.Load(1, &l.root)
	stateSourceObject.Load(2, &l.workingDir)
}

func init() {
	state.Register((*fsFile)(nil))
	state.Register((*fsLookup)(nil))
	state.Register((*VFSFile)(nil))
	state.Register((*vfsLookup)(nil))
}