github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/socket/control/control_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package control 4 5 import ( 6 "github.com/nicocha30/gvisor-ligolo/pkg/state" 7 ) 8 9 func (c *scmCredentials) StateTypeName() string { 10 return "pkg/sentry/socket/control.scmCredentials" 11 } 12 13 func (c *scmCredentials) StateFields() []string { 14 return []string{ 15 "t", 16 "kuid", 17 "kgid", 18 } 19 } 20 21 func (c *scmCredentials) beforeSave() {} 22 23 // +checklocksignore 24 func (c *scmCredentials) StateSave(stateSinkObject state.Sink) { 25 c.beforeSave() 26 stateSinkObject.Save(0, &c.t) 27 stateSinkObject.Save(1, &c.kuid) 28 stateSinkObject.Save(2, &c.kgid) 29 } 30 31 func (c *scmCredentials) afterLoad() {} 32 33 // +checklocksignore 34 func (c *scmCredentials) StateLoad(stateSourceObject state.Source) { 35 stateSourceObject.Load(0, &c.t) 36 stateSourceObject.Load(1, &c.kuid) 37 stateSourceObject.Load(2, &c.kgid) 38 } 39 40 func (fs *RightsFiles) StateTypeName() string { 41 return "pkg/sentry/socket/control.RightsFiles" 42 } 43 44 func (fs *RightsFiles) StateFields() []string { 45 return nil 46 } 47 48 func init() { 49 state.Register((*scmCredentials)(nil)) 50 state.Register((*RightsFiles)(nil)) 51 }