github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/devices/accel/accel_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package accel 4 5 import ( 6 "github.com/ttpreport/gvisor-ligolo/pkg/state" 7 ) 8 9 func (dev *accelDevice) StateTypeName() string { 10 return "pkg/sentry/devices/accel.accelDevice" 11 } 12 13 func (dev *accelDevice) StateFields() []string { 14 return []string{ 15 "minor", 16 } 17 } 18 19 func (dev *accelDevice) beforeSave() {} 20 21 // +checklocksignore 22 func (dev *accelDevice) StateSave(stateSinkObject state.Sink) { 23 dev.beforeSave() 24 stateSinkObject.Save(0, &dev.minor) 25 } 26 27 func (dev *accelDevice) afterLoad() {} 28 29 // +checklocksignore 30 func (dev *accelDevice) StateLoad(stateSourceObject state.Source) { 31 stateSourceObject.Load(0, &dev.minor) 32 } 33 34 func init() { 35 state.Register((*accelDevice)(nil)) 36 }