// automatically generated by stateify. package host import ( "gvisor.dev/gvisor/pkg/state" ) func (x *descriptor) save(m state.Map) { x.beforeSave() m.Save("origFD", &x.origFD) m.Save("wouldBlock", &x.wouldBlock) } func (x *descriptor) load(m state.Map) { m.Load("origFD", &x.origFD) m.Load("wouldBlock", &x.wouldBlock) m.AfterLoad(x.afterLoad) } func (x *fileOperations) beforeSave() {} func (x *fileOperations) save(m state.Map) { x.beforeSave() m.Save("iops", &x.iops) m.Save("dirCursor", &x.dirCursor) } func (x *fileOperations) afterLoad() {} func (x *fileOperations) load(m state.Map) { m.LoadWait("iops", &x.iops) m.Load("dirCursor", &x.dirCursor) } func (x *filesystem) beforeSave() {} func (x *filesystem) save(m state.Map) { x.beforeSave() } func (x *filesystem) afterLoad() {} func (x *filesystem) load(m state.Map) { } func (x *inodeOperations) beforeSave() {} func (x *inodeOperations) save(m state.Map) { x.beforeSave() m.Save("fileState", &x.fileState) m.Save("cachingInodeOps", &x.cachingInodeOps) } func (x *inodeOperations) afterLoad() {} func (x *inodeOperations) load(m state.Map) { m.LoadWait("fileState", &x.fileState) m.Load("cachingInodeOps", &x.cachingInodeOps) } func (x *inodeFileState) beforeSave() {} func (x *inodeFileState) save(m state.Map) { x.beforeSave() if !state.IsZeroValue(x.queue) { m.Failf("queue is %v, expected zero", x.queue) } m.Save("descriptor", &x.descriptor) m.Save("sattr", &x.sattr) m.Save("savedUAttr", &x.savedUAttr) } func (x *inodeFileState) load(m state.Map) { m.LoadWait("descriptor", &x.descriptor) m.LoadWait("sattr", &x.sattr) m.Load("savedUAttr", &x.savedUAttr) m.AfterLoad(x.afterLoad) } func (x *ConnectedEndpoint) save(m state.Map) { x.beforeSave() m.Save("ref", &x.ref) m.Save("queue", &x.queue) m.Save("path", &x.path) m.Save("srfd", &x.srfd) m.Save("stype", &x.stype) } func (x *ConnectedEndpoint) load(m state.Map) { m.Load("ref", &x.ref) m.Load("queue", &x.queue) m.Load("path", &x.path) m.LoadWait("srfd", &x.srfd) m.Load("stype", &x.stype) m.AfterLoad(x.afterLoad) } func (x *TTYFileOperations) beforeSave() {} func (x *TTYFileOperations) save(m state.Map) { x.beforeSave() m.Save("fileOperations", &x.fileOperations) m.Save("session", &x.session) m.Save("fgProcessGroup", &x.fgProcessGroup) m.Save("termios", &x.termios) } func (x *TTYFileOperations) afterLoad() {} func (x *TTYFileOperations) load(m state.Map) { m.Load("fileOperations", &x.fileOperations) m.Load("session", &x.session) m.Load("fgProcessGroup", &x.fgProcessGroup) m.Load("termios", &x.termios) } func init() { state.Register("pkg/sentry/fs/host.descriptor", (*descriptor)(nil), state.Fns{Save: (*descriptor).save, Load: (*descriptor).load}) state.Register("pkg/sentry/fs/host.fileOperations", (*fileOperations)(nil), state.Fns{Save: (*fileOperations).save, Load: (*fileOperations).load}) state.Register("pkg/sentry/fs/host.filesystem", (*filesystem)(nil), state.Fns{Save: (*filesystem).save, Load: (*filesystem).load}) state.Register("pkg/sentry/fs/host.inodeOperations", (*inodeOperations)(nil), state.Fns{Save: (*inodeOperations).save, Load: (*inodeOperations).load}) state.Register("pkg/sentry/fs/host.inodeFileState", (*inodeFileState)(nil), state.Fns{Save: (*inodeFileState).save, Load: (*inodeFileState).load}) state.Register("pkg/sentry/fs/host.ConnectedEndpoint", (*ConnectedEndpoint)(nil), state.Fns{Save: (*ConnectedEndpoint).save, Load: (*ConnectedEndpoint).load}) state.Register("pkg/sentry/fs/host.TTYFileOperations", (*TTYFileOperations)(nil), state.Fns{Save: (*TTYFileOperations).save, Load: (*TTYFileOperations).load}) }