github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package sockfs 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (fsType *filesystemType) StateTypeName() string { 10 return "pkg/sentry/fsimpl/sockfs.filesystemType" 11 } 12 13 func (fsType *filesystemType) StateFields() []string { 14 return []string{} 15 } 16 17 func (fsType *filesystemType) beforeSave() {} 18 19 // +checklocksignore 20 func (fsType *filesystemType) StateSave(stateSinkObject state.Sink) { 21 fsType.beforeSave() 22 } 23 24 func (fsType *filesystemType) afterLoad() {} 25 26 // +checklocksignore 27 func (fsType *filesystemType) StateLoad(stateSourceObject state.Source) { 28 } 29 30 func (fs *filesystem) StateTypeName() string { 31 return "pkg/sentry/fsimpl/sockfs.filesystem" 32 } 33 34 func (fs *filesystem) StateFields() []string { 35 return []string{ 36 "Filesystem", 37 "devMinor", 38 } 39 } 40 41 func (fs *filesystem) beforeSave() {} 42 43 // +checklocksignore 44 func (fs *filesystem) StateSave(stateSinkObject state.Sink) { 45 fs.beforeSave() 46 stateSinkObject.Save(0, &fs.Filesystem) 47 stateSinkObject.Save(1, &fs.devMinor) 48 } 49 50 func (fs *filesystem) afterLoad() {} 51 52 // +checklocksignore 53 func (fs *filesystem) StateLoad(stateSourceObject state.Source) { 54 stateSourceObject.Load(0, &fs.Filesystem) 55 stateSourceObject.Load(1, &fs.devMinor) 56 } 57 58 func (i *inode) StateTypeName() string { 59 return "pkg/sentry/fsimpl/sockfs.inode" 60 } 61 62 func (i *inode) StateFields() []string { 63 return []string{ 64 "InodeAnonymous", 65 "InodeAttrs", 66 "InodeNoopRefCount", 67 "InodeNotDirectory", 68 "InodeNotSymlink", 69 "InodeWatches", 70 } 71 } 72 73 func (i *inode) beforeSave() {} 74 75 // +checklocksignore 76 func (i *inode) StateSave(stateSinkObject state.Sink) { 77 i.beforeSave() 78 stateSinkObject.Save(0, &i.InodeAnonymous) 79 stateSinkObject.Save(1, &i.InodeAttrs) 80 stateSinkObject.Save(2, &i.InodeNoopRefCount) 81 stateSinkObject.Save(3, &i.InodeNotDirectory) 82 stateSinkObject.Save(4, &i.InodeNotSymlink) 83 stateSinkObject.Save(5, &i.InodeWatches) 84 } 85 86 func (i *inode) afterLoad() {} 87 88 // +checklocksignore 89 func (i *inode) StateLoad(stateSourceObject state.Source) { 90 stateSourceObject.Load(0, &i.InodeAnonymous) 91 stateSourceObject.Load(1, &i.InodeAttrs) 92 stateSourceObject.Load(2, &i.InodeNoopRefCount) 93 stateSourceObject.Load(3, &i.InodeNotDirectory) 94 stateSourceObject.Load(4, &i.InodeNotSymlink) 95 stateSourceObject.Load(5, &i.InodeWatches) 96 } 97 98 func init() { 99 state.Register((*filesystemType)(nil)) 100 state.Register((*filesystem)(nil)) 101 state.Register((*inode)(nil)) 102 }