// automatically generated by stateify. package device import ( "gvisor.dev/gvisor/pkg/state" ) func (r *Registry) StateTypeName() string { return "pkg/sentry/device.Registry" } func (r *Registry) StateFields() []string { return []string{ "lastAnonDeviceMinor", "devices", } } func (r *Registry) beforeSave() {} func (r *Registry) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.lastAnonDeviceMinor) stateSinkObject.Save(1, &r.devices) } func (r *Registry) afterLoad() {} func (r *Registry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.lastAnonDeviceMinor) stateSourceObject.Load(1, &r.devices) } func (i *ID) StateTypeName() string { return "pkg/sentry/device.ID" } func (i *ID) StateFields() []string { return []string{ "Major", "Minor", } } func (i *ID) beforeSave() {} func (i *ID) StateSave(stateSinkObject state.Sink) { i.beforeSave() stateSinkObject.Save(0, &i.Major) stateSinkObject.Save(1, &i.Minor) } func (i *ID) afterLoad() {} func (i *ID) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &i.Major) stateSourceObject.Load(1, &i.Minor) } func (d *Device) StateTypeName() string { return "pkg/sentry/device.Device" } func (d *Device) StateFields() []string { return []string{ "ID", "last", } } func (d *Device) beforeSave() {} func (d *Device) StateSave(stateSinkObject state.Sink) { d.beforeSave() stateSinkObject.Save(0, &d.ID) stateSinkObject.Save(1, &d.last) } func (d *Device) afterLoad() {} func (d *Device) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &d.ID) stateSourceObject.Load(1, &d.last) } func init() { state.Register((*Registry)(nil)) state.Register((*ID)(nil)) state.Register((*Device)(nil)) }