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
|
// automatically generated by stateify.
package seqfile
import (
"gvisor.dev/gvisor/pkg/state"
)
func (s *SeqData) StateTypeName() string {
return "pkg/sentry/fs/proc/seqfile.SeqData"
}
func (s *SeqData) StateFields() []string {
return []string{
"Buf",
"Handle",
}
}
func (s *SeqData) beforeSave() {}
// +checklocksignore
func (s *SeqData) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.Buf)
stateSinkObject.Save(1, &s.Handle)
}
func (s *SeqData) afterLoad() {}
// +checklocksignore
func (s *SeqData) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.Buf)
stateSourceObject.Load(1, &s.Handle)
}
func (s *SeqFile) StateTypeName() string {
return "pkg/sentry/fs/proc/seqfile.SeqFile"
}
func (s *SeqFile) StateFields() []string {
return []string{
"InodeSimpleExtendedAttributes",
"InodeSimpleAttributes",
"SeqSource",
"source",
"generation",
"lastRead",
}
}
func (s *SeqFile) beforeSave() {}
// +checklocksignore
func (s *SeqFile) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.InodeSimpleExtendedAttributes)
stateSinkObject.Save(1, &s.InodeSimpleAttributes)
stateSinkObject.Save(2, &s.SeqSource)
stateSinkObject.Save(3, &s.source)
stateSinkObject.Save(4, &s.generation)
stateSinkObject.Save(5, &s.lastRead)
}
func (s *SeqFile) afterLoad() {}
// +checklocksignore
func (s *SeqFile) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.InodeSimpleExtendedAttributes)
stateSourceObject.Load(1, &s.InodeSimpleAttributes)
stateSourceObject.Load(2, &s.SeqSource)
stateSourceObject.Load(3, &s.source)
stateSourceObject.Load(4, &s.generation)
stateSourceObject.Load(5, &s.lastRead)
}
func (sfo *seqFileOperations) StateTypeName() string {
return "pkg/sentry/fs/proc/seqfile.seqFileOperations"
}
func (sfo *seqFileOperations) StateFields() []string {
return []string{
"seqFile",
}
}
func (sfo *seqFileOperations) beforeSave() {}
// +checklocksignore
func (sfo *seqFileOperations) StateSave(stateSinkObject state.Sink) {
sfo.beforeSave()
stateSinkObject.Save(0, &sfo.seqFile)
}
func (sfo *seqFileOperations) afterLoad() {}
// +checklocksignore
func (sfo *seqFileOperations) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &sfo.seqFile)
}
func init() {
state.Register((*SeqData)(nil))
state.Register((*SeqFile)(nil))
state.Register((*seqFileOperations)(nil))
}
|