summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/device/device_state_autogen.go
blob: dd41a5659121501397733857b44e4666286530f6 (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.dev/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("pkg/sentry/device.Registry", (*Registry)(nil), state.Fns{Save: (*Registry).save, Load: (*Registry).load})
	state.Register("pkg/sentry/device.ID", (*ID)(nil), state.Fns{Save: (*ID).save, Load: (*ID).load})
	state.Register("pkg/sentry/device.Device", (*Device)(nil), state.Fns{Save: (*Device).save, Load: (*Device).load})
}