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

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

func (f *fsLookup) beforeSave() {}

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

func (f *fsLookup) afterLoad() {}

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

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

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

func (v *VFSFile) beforeSave() {}

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

func (v *VFSFile) afterLoad() {}

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

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

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

func (v *vfsLookup) beforeSave() {}

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

func (v *vfsLookup) afterLoad() {}

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

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