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