summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/control/control_state_autogen.go
blob: 412025601d7ba249815b39d3d3d14264ac6ccba7 (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
// automatically generated by stateify.

package control

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

func (fs *RightsFiles) StateTypeName() string {
	return "pkg/sentry/socket/control.RightsFiles"
}

func (fs *RightsFiles) StateFields() []string {
	return nil
}

func (c *scmCredentials) StateTypeName() string {
	return "pkg/sentry/socket/control.scmCredentials"
}

func (c *scmCredentials) StateFields() []string {
	return []string{
		"t",
		"kuid",
		"kgid",
	}
}

func (c *scmCredentials) beforeSave() {}

// +checklocksignore
func (c *scmCredentials) StateSave(stateSinkObject state.Sink) {
	c.beforeSave()
	stateSinkObject.Save(0, &c.t)
	stateSinkObject.Save(1, &c.kuid)
	stateSinkObject.Save(2, &c.kgid)
}

func (c *scmCredentials) afterLoad() {}

// +checklocksignore
func (c *scmCredentials) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &c.t)
	stateSourceObject.Load(1, &c.kuid)
	stateSourceObject.Load(2, &c.kgid)
}

func (fs *RightsFilesVFS2) StateTypeName() string {
	return "pkg/sentry/socket/control.RightsFilesVFS2"
}

func (fs *RightsFilesVFS2) StateFields() []string {
	return nil
}

func init() {
	state.Register((*RightsFiles)(nil))
	state.Register((*scmCredentials)(nil))
	state.Register((*RightsFilesVFS2)(nil))
}