summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/sys/sys_state_autogen.go
blob: 390f092cb923a4382989a01914a8a071efa6bd7c (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
// automatically generated by stateify.

package sys

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

func (c *cpunum) StateTypeName() string {
	return "pkg/sentry/fs/sys.cpunum"
}

func (c *cpunum) StateFields() []string {
	return []string{
		"InodeSimpleAttributes",
		"InodeStaticFileGetter",
	}
}

func (c *cpunum) beforeSave() {}

func (c *cpunum) StateSave(stateSinkObject state.Sink) {
	c.beforeSave()
	stateSinkObject.Save(0, &c.InodeSimpleAttributes)
	stateSinkObject.Save(1, &c.InodeStaticFileGetter)
}

func (c *cpunum) afterLoad() {}

func (c *cpunum) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &c.InodeSimpleAttributes)
	stateSourceObject.Load(1, &c.InodeStaticFileGetter)
}

func (f *filesystem) StateTypeName() string {
	return "pkg/sentry/fs/sys.filesystem"
}

func (f *filesystem) StateFields() []string {
	return []string{}
}

func (f *filesystem) beforeSave() {}

func (f *filesystem) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
}

func (f *filesystem) afterLoad() {}

func (f *filesystem) StateLoad(stateSourceObject state.Source) {
}

func init() {
	state.Register((*cpunum)(nil))
	state.Register((*filesystem)(nil))
}