summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/device/device_state_autogen.go
blob: 33cc93f3f6e5f0e6c54ffdff05e96f7fe563891c (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
// automatically generated by stateify.

package device

import (
	"gvisor.googlesource.com/gvisor/pkg/state"
)

func (x *Registry) beforeSave() {}
func (x *Registry) save(m state.Map) {
	x.beforeSave()
	m.Save("lastAnonDeviceMinor", &x.lastAnonDeviceMinor)
	m.Save("devices", &x.devices)
}

func (x *Registry) afterLoad() {}
func (x *Registry) load(m state.Map) {
	m.Load("lastAnonDeviceMinor", &x.lastAnonDeviceMinor)
	m.Load("devices", &x.devices)
}

func (x *ID) beforeSave() {}
func (x *ID) save(m state.Map) {
	x.beforeSave()
	m.Save("Major", &x.Major)
	m.Save("Minor", &x.Minor)
}

func (x *ID) afterLoad() {}
func (x *ID) load(m state.Map) {
	m.Load("Major", &x.Major)
	m.Load("Minor", &x.Minor)
}

func (x *Device) beforeSave() {}
func (x *Device) save(m state.Map) {
	x.beforeSave()
	m.Save("ID", &x.ID)
	m.Save("last", &x.last)
}

func (x *Device) afterLoad() {}
func (x *Device) load(m state.Map) {
	m.Load("ID", &x.ID)
	m.Load("last", &x.last)
}

func init() {
	state.Register("device.Registry", (*Registry)(nil), state.Fns{Save: (*Registry).save, Load: (*Registry).load})
	state.Register("device.ID", (*ID)(nil), state.Fns{Save: (*ID).save, Load: (*ID).load})
	state.Register("device.Device", (*Device)(nil), state.Fns{Save: (*Device).save, Load: (*Device).load})
}