// automatically generated by stateify. package tmpfs import ( "gvisor.dev/gvisor/pkg/state" ) func (r *regularFileOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.regularFileOperations" } func (r *regularFileOperations) StateFields() []string { return []string{ "iops", } } func (r *regularFileOperations) beforeSave() {} // +checklocksignore func (r *regularFileOperations) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.iops) } func (r *regularFileOperations) afterLoad() {} // +checklocksignore func (r *regularFileOperations) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.iops) } func (f *Filesystem) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Filesystem" } func (f *Filesystem) StateFields() []string { return []string{} } func (f *Filesystem) beforeSave() {} // +checklocksignore func (f *Filesystem) StateSave(stateSinkObject state.Sink) { f.beforeSave() } func (f *Filesystem) afterLoad() {} // +checklocksignore func (f *Filesystem) StateLoad(stateSourceObject state.Source) { } func (f *fileInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.fileInodeOperations" } func (f *fileInodeOperations) StateFields() []string { return []string{ "InodeSimpleExtendedAttributes", "kernel", "memUsage", "attr", "mappings", "writableMappingPages", "data", "seals", } } func (f *fileInodeOperations) beforeSave() {} // +checklocksignore func (f *fileInodeOperations) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.InodeSimpleExtendedAttributes) stateSinkObject.Save(1, &f.kernel) stateSinkObject.Save(2, &f.memUsage) stateSinkObject.Save(3, &f.attr) stateSinkObject.Save(4, &f.mappings) stateSinkObject.Save(5, &f.writableMappingPages) stateSinkObject.Save(6, &f.data) stateSinkObject.Save(7, &f.seals) } func (f *fileInodeOperations) afterLoad() {} // +checklocksignore func (f *fileInodeOperations) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.InodeSimpleExtendedAttributes) stateSourceObject.Load(1, &f.kernel) stateSourceObject.Load(2, &f.memUsage) stateSourceObject.Load(3, &f.attr) stateSourceObject.Load(4, &f.mappings) stateSourceObject.Load(5, &f.writableMappingPages) stateSourceObject.Load(6, &f.data) stateSourceObject.Load(7, &f.seals) } func (d *Dir) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Dir" } func (d *Dir) StateFields() []string { return []string{ "ramfsDir", "kernel", } } func (d *Dir) beforeSave() {} // +checklocksignore func (d *Dir) StateSave(stateSinkObject state.Sink) { d.beforeSave() stateSinkObject.Save(0, &d.ramfsDir) stateSinkObject.Save(1, &d.kernel) } // +checklocksignore func (d *Dir) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &d.ramfsDir) stateSourceObject.Load(1, &d.kernel) stateSourceObject.AfterLoad(d.afterLoad) } func (s *Symlink) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Symlink" } func (s *Symlink) StateFields() []string { return []string{ "Symlink", } } func (s *Symlink) beforeSave() {} // +checklocksignore func (s *Symlink) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.Symlink) } func (s *Symlink) afterLoad() {} // +checklocksignore func (s *Symlink) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.Symlink) } func (s *Socket) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Socket" } func (s *Socket) StateFields() []string { return []string{ "Socket", } } func (s *Socket) beforeSave() {} // +checklocksignore func (s *Socket) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.Socket) } func (s *Socket) afterLoad() {} // +checklocksignore func (s *Socket) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.Socket) } func (f *Fifo) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Fifo" } func (f *Fifo) StateFields() []string { return []string{ "InodeOperations", } } func (f *Fifo) beforeSave() {} // +checklocksignore func (f *Fifo) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.InodeOperations) } func (f *Fifo) afterLoad() {} // +checklocksignore func (f *Fifo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.InodeOperations) } func init() { state.Register((*regularFileOperations)(nil)) state.Register((*Filesystem)(nil)) state.Register((*fileInodeOperations)(nil)) state.Register((*Dir)(nil)) state.Register((*Symlink)(nil)) state.Register((*Socket)(nil)) state.Register((*Fifo)(nil)) }