summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/fsutil/fsutil_state_autogen.go
blob: 80b93ad2547189446b2828dd07f578d4b352198c (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
// automatically generated by stateify.

package fsutil

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

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

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

func (x *StaticDirFileOperations) beforeSave() {}
func (x *StaticDirFileOperations) save(m state.Map) {
	x.beforeSave()
	m.Save("dentryMap", &x.dentryMap)
	m.Save("dirCursor", &x.dirCursor)
}

func (x *StaticDirFileOperations) afterLoad() {}
func (x *StaticDirFileOperations) load(m state.Map) {
	m.Load("dentryMap", &x.dentryMap)
	m.Load("dirCursor", &x.dirCursor)
}

func (x *NoReadWriteFile) beforeSave() {}
func (x *NoReadWriteFile) save(m state.Map) {
	x.beforeSave()
}

func (x *NoReadWriteFile) afterLoad() {}
func (x *NoReadWriteFile) load(m state.Map) {
}

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

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

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

func (x *HostFileMapper) load(m state.Map) {
	m.Load("refs", &x.refs)
	m.AfterLoad(x.afterLoad)
}

func (x *HostMappable) beforeSave() {}
func (x *HostMappable) save(m state.Map) {
	x.beforeSave()
	m.Save("hostFileMapper", &x.hostFileMapper)
	m.Save("backingFile", &x.backingFile)
	m.Save("mappings", &x.mappings)
}

func (x *HostMappable) afterLoad() {}
func (x *HostMappable) load(m state.Map) {
	m.Load("hostFileMapper", &x.hostFileMapper)
	m.Load("backingFile", &x.backingFile)
	m.Load("mappings", &x.mappings)
}

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

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

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

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

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

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

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

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

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

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

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

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

func (x *CachingInodeOperations) beforeSave() {}
func (x *CachingInodeOperations) save(m state.Map) {
	x.beforeSave()
	m.Save("backingFile", &x.backingFile)
	m.Save("mfp", &x.mfp)
	m.Save("opts", &x.opts)
	m.Save("attr", &x.attr)
	m.Save("dirtyAttr", &x.dirtyAttr)
	m.Save("mappings", &x.mappings)
	m.Save("cache", &x.cache)
	m.Save("dirty", &x.dirty)
	m.Save("hostFileMapper", &x.hostFileMapper)
	m.Save("refs", &x.refs)
}

func (x *CachingInodeOperations) afterLoad() {}
func (x *CachingInodeOperations) load(m state.Map) {
	m.Load("backingFile", &x.backingFile)
	m.Load("mfp", &x.mfp)
	m.Load("opts", &x.opts)
	m.Load("attr", &x.attr)
	m.Load("dirtyAttr", &x.dirtyAttr)
	m.Load("mappings", &x.mappings)
	m.Load("cache", &x.cache)
	m.Load("dirty", &x.dirty)
	m.Load("hostFileMapper", &x.hostFileMapper)
	m.Load("refs", &x.refs)
}

func (x *CachingInodeOperationsOptions) beforeSave() {}
func (x *CachingInodeOperationsOptions) save(m state.Map) {
	x.beforeSave()
	m.Save("ForcePageCache", &x.ForcePageCache)
	m.Save("LimitHostFDTranslation", &x.LimitHostFDTranslation)
}

func (x *CachingInodeOperationsOptions) afterLoad() {}
func (x *CachingInodeOperationsOptions) load(m state.Map) {
	m.Load("ForcePageCache", &x.ForcePageCache)
	m.Load("LimitHostFDTranslation", &x.LimitHostFDTranslation)
}

func init() {
	state.Register("pkg/sentry/fs/fsutil.DirtyInfo", (*DirtyInfo)(nil), state.Fns{Save: (*DirtyInfo).save, Load: (*DirtyInfo).load})
	state.Register("pkg/sentry/fs/fsutil.StaticDirFileOperations", (*StaticDirFileOperations)(nil), state.Fns{Save: (*StaticDirFileOperations).save, Load: (*StaticDirFileOperations).load})
	state.Register("pkg/sentry/fs/fsutil.NoReadWriteFile", (*NoReadWriteFile)(nil), state.Fns{Save: (*NoReadWriteFile).save, Load: (*NoReadWriteFile).load})
	state.Register("pkg/sentry/fs/fsutil.FileStaticContentReader", (*FileStaticContentReader)(nil), state.Fns{Save: (*FileStaticContentReader).save, Load: (*FileStaticContentReader).load})
	state.Register("pkg/sentry/fs/fsutil.HostFileMapper", (*HostFileMapper)(nil), state.Fns{Save: (*HostFileMapper).save, Load: (*HostFileMapper).load})
	state.Register("pkg/sentry/fs/fsutil.HostMappable", (*HostMappable)(nil), state.Fns{Save: (*HostMappable).save, Load: (*HostMappable).load})
	state.Register("pkg/sentry/fs/fsutil.SimpleFileInode", (*SimpleFileInode)(nil), state.Fns{Save: (*SimpleFileInode).save, Load: (*SimpleFileInode).load})
	state.Register("pkg/sentry/fs/fsutil.NoReadWriteFileInode", (*NoReadWriteFileInode)(nil), state.Fns{Save: (*NoReadWriteFileInode).save, Load: (*NoReadWriteFileInode).load})
	state.Register("pkg/sentry/fs/fsutil.InodeSimpleAttributes", (*InodeSimpleAttributes)(nil), state.Fns{Save: (*InodeSimpleAttributes).save, Load: (*InodeSimpleAttributes).load})
	state.Register("pkg/sentry/fs/fsutil.InodeSimpleExtendedAttributes", (*InodeSimpleExtendedAttributes)(nil), state.Fns{Save: (*InodeSimpleExtendedAttributes).save, Load: (*InodeSimpleExtendedAttributes).load})
	state.Register("pkg/sentry/fs/fsutil.staticFile", (*staticFile)(nil), state.Fns{Save: (*staticFile).save, Load: (*staticFile).load})
	state.Register("pkg/sentry/fs/fsutil.InodeStaticFileGetter", (*InodeStaticFileGetter)(nil), state.Fns{Save: (*InodeStaticFileGetter).save, Load: (*InodeStaticFileGetter).load})
	state.Register("pkg/sentry/fs/fsutil.CachingInodeOperations", (*CachingInodeOperations)(nil), state.Fns{Save: (*CachingInodeOperations).save, Load: (*CachingInodeOperations).load})
	state.Register("pkg/sentry/fs/fsutil.CachingInodeOperationsOptions", (*CachingInodeOperationsOptions)(nil), state.Fns{Save: (*CachingInodeOperationsOptions).save, Load: (*CachingInodeOperationsOptions).load})
}