diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-08 01:32:17 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-08 01:32:17 +0000 |
commit | 8f70c8003e9d132fc766ed7d92ce805c093d518b (patch) | |
tree | 6d77a3246e3f04605790d410e7630cb910704ced /pkg/sentry/fs | |
parent | 8f9d99c812b7599c52ed98f80c1a33717758a5c6 (diff) | |
parent | a55bd73d4802112a7055de8663e947b9c0f42a2e (diff) |
Merge release-20200928.0-66-ga55bd73d4 (automated)
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r-- | pkg/sentry/fs/dev/dev_state_autogen.go | 210 | ||||
-rw-r--r-- | pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go | 26 | ||||
-rw-r--r-- | pkg/sentry/fs/fs_state_autogen.go | 1084 | ||||
-rw-r--r-- | pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go | 276 | ||||
-rw-r--r-- | pkg/sentry/fs/fsutil/fsutil_state_autogen.go | 304 | ||||
-rw-r--r-- | pkg/sentry/fs/fsutil/inode_cached.go | 13 | ||||
-rw-r--r-- | pkg/sentry/fs/gofer/gofer_state_autogen.go | 226 | ||||
-rw-r--r-- | pkg/sentry/fs/host/host_state_autogen.go | 170 | ||||
-rw-r--r-- | pkg/sentry/fs/lock/lock_state_autogen.go | 158 | ||||
-rw-r--r-- | pkg/sentry/fs/proc/proc_state_autogen.go | 1244 | ||||
-rw-r--r-- | pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go | 78 | ||||
-rw-r--r-- | pkg/sentry/fs/ramfs/ramfs_state_autogen.go | 132 | ||||
-rw-r--r-- | pkg/sentry/fs/sys/sys_state_autogen.go | 36 | ||||
-rw-r--r-- | pkg/sentry/fs/timerfd/timerfd_state_autogen.go | 26 | ||||
-rw-r--r-- | pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go | 154 | ||||
-rw-r--r-- | pkg/sentry/fs/tty/tty_state_autogen.go | 318 |
16 files changed, 2224 insertions, 2231 deletions
diff --git a/pkg/sentry/fs/dev/dev_state_autogen.go b/pkg/sentry/fs/dev/dev_state_autogen.go index 48a60e45f..09e71c0c8 100644 --- a/pkg/sentry/fs/dev/dev_state_autogen.go +++ b/pkg/sentry/fs/dev/dev_state_autogen.go @@ -6,279 +6,279 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/dev.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *fullDevice) StateTypeName() string { +func (f *fullDevice) StateTypeName() string { return "pkg/sentry/fs/dev.fullDevice" } -func (x *fullDevice) StateFields() []string { +func (f *fullDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *fullDevice) beforeSave() {} +func (f *fullDevice) beforeSave() {} -func (x *fullDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (f *fullDevice) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeSimpleAttributes) } -func (x *fullDevice) afterLoad() {} +func (f *fullDevice) afterLoad() {} -func (x *fullDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (f *fullDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeSimpleAttributes) } -func (x *fullFileOperations) StateTypeName() string { +func (f *fullFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.fullFileOperations" } -func (x *fullFileOperations) StateFields() []string { +func (f *fullFileOperations) StateFields() []string { return []string{} } -func (x *fullFileOperations) beforeSave() {} +func (f *fullFileOperations) beforeSave() {} -func (x *fullFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (f *fullFileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *fullFileOperations) afterLoad() {} +func (f *fullFileOperations) afterLoad() {} -func (x *fullFileOperations) StateLoad(m state.Source) { +func (f *fullFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *netTunInodeOperations) StateTypeName() string { +func (n *netTunInodeOperations) StateTypeName() string { return "pkg/sentry/fs/dev.netTunInodeOperations" } -func (x *netTunInodeOperations) StateFields() []string { +func (n *netTunInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *netTunInodeOperations) beforeSave() {} +func (n *netTunInodeOperations) beforeSave() {} -func (x *netTunInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *netTunInodeOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *netTunInodeOperations) afterLoad() {} +func (n *netTunInodeOperations) afterLoad() {} -func (x *netTunInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *netTunInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *netTunFileOperations) StateTypeName() string { +func (n *netTunFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.netTunFileOperations" } -func (x *netTunFileOperations) StateFields() []string { +func (n *netTunFileOperations) StateFields() []string { return []string{ "device", } } -func (x *netTunFileOperations) beforeSave() {} +func (n *netTunFileOperations) beforeSave() {} -func (x *netTunFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.device) +func (n *netTunFileOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.device) } -func (x *netTunFileOperations) afterLoad() {} +func (n *netTunFileOperations) afterLoad() {} -func (x *netTunFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.device) +func (n *netTunFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.device) } -func (x *nullDevice) StateTypeName() string { +func (n *nullDevice) StateTypeName() string { return "pkg/sentry/fs/dev.nullDevice" } -func (x *nullDevice) StateFields() []string { +func (n *nullDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *nullDevice) beforeSave() {} +func (n *nullDevice) beforeSave() {} -func (x *nullDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *nullDevice) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *nullDevice) afterLoad() {} +func (n *nullDevice) afterLoad() {} -func (x *nullDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *nullDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *nullFileOperations) StateTypeName() string { +func (n *nullFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.nullFileOperations" } -func (x *nullFileOperations) StateFields() []string { +func (n *nullFileOperations) StateFields() []string { return []string{} } -func (x *nullFileOperations) beforeSave() {} +func (n *nullFileOperations) beforeSave() {} -func (x *nullFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (n *nullFileOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *nullFileOperations) afterLoad() {} +func (n *nullFileOperations) afterLoad() {} -func (x *nullFileOperations) StateLoad(m state.Source) { +func (n *nullFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *zeroDevice) StateTypeName() string { +func (z *zeroDevice) StateTypeName() string { return "pkg/sentry/fs/dev.zeroDevice" } -func (x *zeroDevice) StateFields() []string { +func (z *zeroDevice) StateFields() []string { return []string{ "nullDevice", } } -func (x *zeroDevice) beforeSave() {} +func (z *zeroDevice) beforeSave() {} -func (x *zeroDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nullDevice) +func (z *zeroDevice) StateSave(stateSinkObject state.Sink) { + z.beforeSave() + stateSinkObject.Save(0, &z.nullDevice) } -func (x *zeroDevice) afterLoad() {} +func (z *zeroDevice) afterLoad() {} -func (x *zeroDevice) StateLoad(m state.Source) { - m.Load(0, &x.nullDevice) +func (z *zeroDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &z.nullDevice) } -func (x *zeroFileOperations) StateTypeName() string { +func (z *zeroFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.zeroFileOperations" } -func (x *zeroFileOperations) StateFields() []string { +func (z *zeroFileOperations) StateFields() []string { return []string{} } -func (x *zeroFileOperations) beforeSave() {} +func (z *zeroFileOperations) beforeSave() {} -func (x *zeroFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (z *zeroFileOperations) StateSave(stateSinkObject state.Sink) { + z.beforeSave() } -func (x *zeroFileOperations) afterLoad() {} +func (z *zeroFileOperations) afterLoad() {} -func (x *zeroFileOperations) StateLoad(m state.Source) { +func (z *zeroFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *randomDevice) StateTypeName() string { +func (r *randomDevice) StateTypeName() string { return "pkg/sentry/fs/dev.randomDevice" } -func (x *randomDevice) StateFields() []string { +func (r *randomDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *randomDevice) beforeSave() {} +func (r *randomDevice) beforeSave() {} -func (x *randomDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (r *randomDevice) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.InodeSimpleAttributes) } -func (x *randomDevice) afterLoad() {} +func (r *randomDevice) afterLoad() {} -func (x *randomDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (r *randomDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.InodeSimpleAttributes) } -func (x *randomFileOperations) StateTypeName() string { +func (r *randomFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.randomFileOperations" } -func (x *randomFileOperations) StateFields() []string { +func (r *randomFileOperations) StateFields() []string { return []string{} } -func (x *randomFileOperations) beforeSave() {} +func (r *randomFileOperations) beforeSave() {} -func (x *randomFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (r *randomFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *randomFileOperations) afterLoad() {} +func (r *randomFileOperations) afterLoad() {} -func (x *randomFileOperations) StateLoad(m state.Source) { +func (r *randomFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *ttyInodeOperations) StateTypeName() string { +func (t *ttyInodeOperations) StateTypeName() string { return "pkg/sentry/fs/dev.ttyInodeOperations" } -func (x *ttyInodeOperations) StateFields() []string { +func (t *ttyInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *ttyInodeOperations) beforeSave() {} +func (t *ttyInodeOperations) beforeSave() {} -func (x *ttyInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (t *ttyInodeOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.InodeSimpleAttributes) } -func (x *ttyInodeOperations) afterLoad() {} +func (t *ttyInodeOperations) afterLoad() {} -func (x *ttyInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (t *ttyInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.InodeSimpleAttributes) } -func (x *ttyFileOperations) StateTypeName() string { +func (t *ttyFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.ttyFileOperations" } -func (x *ttyFileOperations) StateFields() []string { +func (t *ttyFileOperations) StateFields() []string { return []string{} } -func (x *ttyFileOperations) beforeSave() {} +func (t *ttyFileOperations) beforeSave() {} -func (x *ttyFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (t *ttyFileOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() } -func (x *ttyFileOperations) afterLoad() {} +func (t *ttyFileOperations) afterLoad() {} -func (x *ttyFileOperations) StateLoad(m state.Source) { +func (t *ttyFileOperations) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go index 359d52e92..f946f2ba5 100644 --- a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go +++ b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *pipeOperations) StateTypeName() string { +func (p *pipeOperations) StateTypeName() string { return "pkg/sentry/fs/fdpipe.pipeOperations" } -func (x *pipeOperations) StateFields() []string { +func (p *pipeOperations) StateFields() []string { return []string{ "flags", "opener", @@ -19,19 +19,19 @@ func (x *pipeOperations) StateFields() []string { } } -func (x *pipeOperations) StateSave(m state.Sink) { - x.beforeSave() - var flags fs.FileFlags = x.saveFlags() - m.SaveValue(0, flags) - m.Save(1, &x.opener) - m.Save(2, &x.readAheadBuffer) +func (p *pipeOperations) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + var flagsValue fs.FileFlags = p.saveFlags() + stateSinkObject.SaveValue(0, flagsValue) + stateSinkObject.Save(1, &p.opener) + stateSinkObject.Save(2, &p.readAheadBuffer) } -func (x *pipeOperations) StateLoad(m state.Source) { - m.LoadWait(1, &x.opener) - m.Load(2, &x.readAheadBuffer) - m.LoadValue(0, new(fs.FileFlags), func(y interface{}) { x.loadFlags(y.(fs.FileFlags)) }) - m.AfterLoad(x.afterLoad) +func (p *pipeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(1, &p.opener) + stateSourceObject.Load(2, &p.readAheadBuffer) + stateSourceObject.LoadValue(0, new(fs.FileFlags), func(y interface{}) { p.loadFlags(y.(fs.FileFlags)) }) + stateSourceObject.AfterLoad(p.afterLoad) } func init() { diff --git a/pkg/sentry/fs/fs_state_autogen.go b/pkg/sentry/fs/fs_state_autogen.go index 78e30e0e4..95df2cad0 100644 --- a/pkg/sentry/fs/fs_state_autogen.go +++ b/pkg/sentry/fs/fs_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *StableAttr) StateTypeName() string { +func (s *StableAttr) StateTypeName() string { return "pkg/sentry/fs.StableAttr" } -func (x *StableAttr) StateFields() []string { +func (s *StableAttr) StateFields() []string { return []string{ "Type", "DeviceID", @@ -21,34 +21,34 @@ func (x *StableAttr) StateFields() []string { } } -func (x *StableAttr) beforeSave() {} +func (s *StableAttr) beforeSave() {} -func (x *StableAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.DeviceID) - m.Save(2, &x.InodeID) - m.Save(3, &x.BlockSize) - m.Save(4, &x.DeviceFileMajor) - m.Save(5, &x.DeviceFileMinor) +func (s *StableAttr) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Type) + stateSinkObject.Save(1, &s.DeviceID) + stateSinkObject.Save(2, &s.InodeID) + stateSinkObject.Save(3, &s.BlockSize) + stateSinkObject.Save(4, &s.DeviceFileMajor) + stateSinkObject.Save(5, &s.DeviceFileMinor) } -func (x *StableAttr) afterLoad() {} +func (s *StableAttr) afterLoad() {} -func (x *StableAttr) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.DeviceID) - m.Load(2, &x.InodeID) - m.Load(3, &x.BlockSize) - m.Load(4, &x.DeviceFileMajor) - m.Load(5, &x.DeviceFileMinor) +func (s *StableAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Type) + stateSourceObject.Load(1, &s.DeviceID) + stateSourceObject.Load(2, &s.InodeID) + stateSourceObject.Load(3, &s.BlockSize) + stateSourceObject.Load(4, &s.DeviceFileMajor) + stateSourceObject.Load(5, &s.DeviceFileMinor) } -func (x *UnstableAttr) StateTypeName() string { +func (u *UnstableAttr) StateTypeName() string { return "pkg/sentry/fs.UnstableAttr" } -func (x *UnstableAttr) StateFields() []string { +func (u *UnstableAttr) StateFields() []string { return []string{ "Size", "Usage", @@ -61,38 +61,38 @@ func (x *UnstableAttr) StateFields() []string { } } -func (x *UnstableAttr) beforeSave() {} +func (u *UnstableAttr) beforeSave() {} -func (x *UnstableAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Size) - m.Save(1, &x.Usage) - m.Save(2, &x.Perms) - m.Save(3, &x.Owner) - m.Save(4, &x.AccessTime) - m.Save(5, &x.ModificationTime) - m.Save(6, &x.StatusChangeTime) - m.Save(7, &x.Links) +func (u *UnstableAttr) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.Size) + stateSinkObject.Save(1, &u.Usage) + stateSinkObject.Save(2, &u.Perms) + stateSinkObject.Save(3, &u.Owner) + stateSinkObject.Save(4, &u.AccessTime) + stateSinkObject.Save(5, &u.ModificationTime) + stateSinkObject.Save(6, &u.StatusChangeTime) + stateSinkObject.Save(7, &u.Links) } -func (x *UnstableAttr) afterLoad() {} +func (u *UnstableAttr) afterLoad() {} -func (x *UnstableAttr) StateLoad(m state.Source) { - m.Load(0, &x.Size) - m.Load(1, &x.Usage) - m.Load(2, &x.Perms) - m.Load(3, &x.Owner) - m.Load(4, &x.AccessTime) - m.Load(5, &x.ModificationTime) - m.Load(6, &x.StatusChangeTime) - m.Load(7, &x.Links) +func (u *UnstableAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.Size) + stateSourceObject.Load(1, &u.Usage) + stateSourceObject.Load(2, &u.Perms) + stateSourceObject.Load(3, &u.Owner) + stateSourceObject.Load(4, &u.AccessTime) + stateSourceObject.Load(5, &u.ModificationTime) + stateSourceObject.Load(6, &u.StatusChangeTime) + stateSourceObject.Load(7, &u.Links) } -func (x *AttrMask) StateTypeName() string { +func (a *AttrMask) StateTypeName() string { return "pkg/sentry/fs.AttrMask" } -func (x *AttrMask) StateFields() []string { +func (a *AttrMask) StateFields() []string { return []string{ "Type", "DeviceID", @@ -110,48 +110,48 @@ func (x *AttrMask) StateFields() []string { } } -func (x *AttrMask) beforeSave() {} - -func (x *AttrMask) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.DeviceID) - m.Save(2, &x.InodeID) - m.Save(3, &x.BlockSize) - m.Save(4, &x.Size) - m.Save(5, &x.Usage) - m.Save(6, &x.Perms) - m.Save(7, &x.UID) - m.Save(8, &x.GID) - m.Save(9, &x.AccessTime) - m.Save(10, &x.ModificationTime) - m.Save(11, &x.StatusChangeTime) - m.Save(12, &x.Links) -} - -func (x *AttrMask) afterLoad() {} - -func (x *AttrMask) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.DeviceID) - m.Load(2, &x.InodeID) - m.Load(3, &x.BlockSize) - m.Load(4, &x.Size) - m.Load(5, &x.Usage) - m.Load(6, &x.Perms) - m.Load(7, &x.UID) - m.Load(8, &x.GID) - m.Load(9, &x.AccessTime) - m.Load(10, &x.ModificationTime) - m.Load(11, &x.StatusChangeTime) - m.Load(12, &x.Links) -} - -func (x *PermMask) StateTypeName() string { +func (a *AttrMask) beforeSave() {} + +func (a *AttrMask) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.Type) + stateSinkObject.Save(1, &a.DeviceID) + stateSinkObject.Save(2, &a.InodeID) + stateSinkObject.Save(3, &a.BlockSize) + stateSinkObject.Save(4, &a.Size) + stateSinkObject.Save(5, &a.Usage) + stateSinkObject.Save(6, &a.Perms) + stateSinkObject.Save(7, &a.UID) + stateSinkObject.Save(8, &a.GID) + stateSinkObject.Save(9, &a.AccessTime) + stateSinkObject.Save(10, &a.ModificationTime) + stateSinkObject.Save(11, &a.StatusChangeTime) + stateSinkObject.Save(12, &a.Links) +} + +func (a *AttrMask) afterLoad() {} + +func (a *AttrMask) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.Type) + stateSourceObject.Load(1, &a.DeviceID) + stateSourceObject.Load(2, &a.InodeID) + stateSourceObject.Load(3, &a.BlockSize) + stateSourceObject.Load(4, &a.Size) + stateSourceObject.Load(5, &a.Usage) + stateSourceObject.Load(6, &a.Perms) + stateSourceObject.Load(7, &a.UID) + stateSourceObject.Load(8, &a.GID) + stateSourceObject.Load(9, &a.AccessTime) + stateSourceObject.Load(10, &a.ModificationTime) + stateSourceObject.Load(11, &a.StatusChangeTime) + stateSourceObject.Load(12, &a.Links) +} + +func (p *PermMask) StateTypeName() string { return "pkg/sentry/fs.PermMask" } -func (x *PermMask) StateFields() []string { +func (p *PermMask) StateFields() []string { return []string{ "Read", "Write", @@ -159,28 +159,28 @@ func (x *PermMask) StateFields() []string { } } -func (x *PermMask) beforeSave() {} +func (p *PermMask) beforeSave() {} -func (x *PermMask) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Read) - m.Save(1, &x.Write) - m.Save(2, &x.Execute) +func (p *PermMask) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Read) + stateSinkObject.Save(1, &p.Write) + stateSinkObject.Save(2, &p.Execute) } -func (x *PermMask) afterLoad() {} +func (p *PermMask) afterLoad() {} -func (x *PermMask) StateLoad(m state.Source) { - m.Load(0, &x.Read) - m.Load(1, &x.Write) - m.Load(2, &x.Execute) +func (p *PermMask) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Read) + stateSourceObject.Load(1, &p.Write) + stateSourceObject.Load(2, &p.Execute) } -func (x *FilePermissions) StateTypeName() string { +func (f *FilePermissions) StateTypeName() string { return "pkg/sentry/fs.FilePermissions" } -func (x *FilePermissions) StateFields() []string { +func (f *FilePermissions) StateFields() []string { return []string{ "User", "Group", @@ -191,112 +191,112 @@ func (x *FilePermissions) StateFields() []string { } } -func (x *FilePermissions) beforeSave() {} +func (f *FilePermissions) beforeSave() {} -func (x *FilePermissions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.User) - m.Save(1, &x.Group) - m.Save(2, &x.Other) - m.Save(3, &x.Sticky) - m.Save(4, &x.SetUID) - m.Save(5, &x.SetGID) +func (f *FilePermissions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.User) + stateSinkObject.Save(1, &f.Group) + stateSinkObject.Save(2, &f.Other) + stateSinkObject.Save(3, &f.Sticky) + stateSinkObject.Save(4, &f.SetUID) + stateSinkObject.Save(5, &f.SetGID) } -func (x *FilePermissions) afterLoad() {} +func (f *FilePermissions) afterLoad() {} -func (x *FilePermissions) StateLoad(m state.Source) { - m.Load(0, &x.User) - m.Load(1, &x.Group) - m.Load(2, &x.Other) - m.Load(3, &x.Sticky) - m.Load(4, &x.SetUID) - m.Load(5, &x.SetGID) +func (f *FilePermissions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.User) + stateSourceObject.Load(1, &f.Group) + stateSourceObject.Load(2, &f.Other) + stateSourceObject.Load(3, &f.Sticky) + stateSourceObject.Load(4, &f.SetUID) + stateSourceObject.Load(5, &f.SetGID) } -func (x *FileOwner) StateTypeName() string { +func (f *FileOwner) StateTypeName() string { return "pkg/sentry/fs.FileOwner" } -func (x *FileOwner) StateFields() []string { +func (f *FileOwner) StateFields() []string { return []string{ "UID", "GID", } } -func (x *FileOwner) beforeSave() {} +func (f *FileOwner) beforeSave() {} -func (x *FileOwner) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.UID) - m.Save(1, &x.GID) +func (f *FileOwner) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.UID) + stateSinkObject.Save(1, &f.GID) } -func (x *FileOwner) afterLoad() {} +func (f *FileOwner) afterLoad() {} -func (x *FileOwner) StateLoad(m state.Source) { - m.Load(0, &x.UID) - m.Load(1, &x.GID) +func (f *FileOwner) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.UID) + stateSourceObject.Load(1, &f.GID) } -func (x *DentAttr) StateTypeName() string { +func (d *DentAttr) StateTypeName() string { return "pkg/sentry/fs.DentAttr" } -func (x *DentAttr) StateFields() []string { +func (d *DentAttr) StateFields() []string { return []string{ "Type", "InodeID", } } -func (x *DentAttr) beforeSave() {} +func (d *DentAttr) beforeSave() {} -func (x *DentAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.InodeID) +func (d *DentAttr) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Type) + stateSinkObject.Save(1, &d.InodeID) } -func (x *DentAttr) afterLoad() {} +func (d *DentAttr) afterLoad() {} -func (x *DentAttr) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.InodeID) +func (d *DentAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Type) + stateSourceObject.Load(1, &d.InodeID) } -func (x *SortedDentryMap) StateTypeName() string { +func (s *SortedDentryMap) StateTypeName() string { return "pkg/sentry/fs.SortedDentryMap" } -func (x *SortedDentryMap) StateFields() []string { +func (s *SortedDentryMap) StateFields() []string { return []string{ "names", "entries", } } -func (x *SortedDentryMap) beforeSave() {} +func (s *SortedDentryMap) beforeSave() {} -func (x *SortedDentryMap) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.names) - m.Save(1, &x.entries) +func (s *SortedDentryMap) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.names) + stateSinkObject.Save(1, &s.entries) } -func (x *SortedDentryMap) afterLoad() {} +func (s *SortedDentryMap) afterLoad() {} -func (x *SortedDentryMap) StateLoad(m state.Source) { - m.Load(0, &x.names) - m.Load(1, &x.entries) +func (s *SortedDentryMap) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.names) + stateSourceObject.Load(1, &s.entries) } -func (x *Dirent) StateTypeName() string { +func (d *Dirent) StateTypeName() string { return "pkg/sentry/fs.Dirent" } -func (x *Dirent) StateFields() []string { +func (d *Dirent) StateFields() []string { return []string{ "AtomicRefCount", "userVisible", @@ -309,198 +309,198 @@ func (x *Dirent) StateFields() []string { } } -func (x *Dirent) StateSave(m state.Sink) { - x.beforeSave() - var children map[string]*Dirent = x.saveChildren() - m.SaveValue(7, children) - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.userVisible) - m.Save(2, &x.Inode) - m.Save(3, &x.name) - m.Save(4, &x.parent) - m.Save(5, &x.deleted) - m.Save(6, &x.mounted) -} - -func (x *Dirent) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.userVisible) - m.Load(2, &x.Inode) - m.Load(3, &x.name) - m.Load(4, &x.parent) - m.Load(5, &x.deleted) - m.Load(6, &x.mounted) - m.LoadValue(7, new(map[string]*Dirent), func(y interface{}) { x.loadChildren(y.(map[string]*Dirent)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *DirentCache) StateTypeName() string { +func (d *Dirent) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var childrenValue map[string]*Dirent = d.saveChildren() + stateSinkObject.SaveValue(7, childrenValue) + stateSinkObject.Save(0, &d.AtomicRefCount) + stateSinkObject.Save(1, &d.userVisible) + stateSinkObject.Save(2, &d.Inode) + stateSinkObject.Save(3, &d.name) + stateSinkObject.Save(4, &d.parent) + stateSinkObject.Save(5, &d.deleted) + stateSinkObject.Save(6, &d.mounted) +} + +func (d *Dirent) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.AtomicRefCount) + stateSourceObject.Load(1, &d.userVisible) + stateSourceObject.Load(2, &d.Inode) + stateSourceObject.Load(3, &d.name) + stateSourceObject.Load(4, &d.parent) + stateSourceObject.Load(5, &d.deleted) + stateSourceObject.Load(6, &d.mounted) + stateSourceObject.LoadValue(7, new(map[string]*Dirent), func(y interface{}) { d.loadChildren(y.(map[string]*Dirent)) }) + stateSourceObject.AfterLoad(d.afterLoad) +} + +func (d *DirentCache) StateTypeName() string { return "pkg/sentry/fs.DirentCache" } -func (x *DirentCache) StateFields() []string { +func (d *DirentCache) StateFields() []string { return []string{ "maxSize", "limit", } } -func (x *DirentCache) beforeSave() {} +func (d *DirentCache) beforeSave() {} -func (x *DirentCache) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.currentSize) { - state.Failf("currentSize is %#v, expected zero", &x.currentSize) +func (d *DirentCache) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + if !state.IsZeroValue(&d.currentSize) { + state.Failf("currentSize is %#v, expected zero", &d.currentSize) } - if !state.IsZeroValue(&x.list) { - state.Failf("list is %#v, expected zero", &x.list) + if !state.IsZeroValue(&d.list) { + state.Failf("list is %#v, expected zero", &d.list) } - m.Save(0, &x.maxSize) - m.Save(1, &x.limit) + stateSinkObject.Save(0, &d.maxSize) + stateSinkObject.Save(1, &d.limit) } -func (x *DirentCache) afterLoad() {} +func (d *DirentCache) afterLoad() {} -func (x *DirentCache) StateLoad(m state.Source) { - m.Load(0, &x.maxSize) - m.Load(1, &x.limit) +func (d *DirentCache) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.maxSize) + stateSourceObject.Load(1, &d.limit) } -func (x *DirentCacheLimiter) StateTypeName() string { +func (d *DirentCacheLimiter) StateTypeName() string { return "pkg/sentry/fs.DirentCacheLimiter" } -func (x *DirentCacheLimiter) StateFields() []string { +func (d *DirentCacheLimiter) StateFields() []string { return []string{ "max", } } -func (x *DirentCacheLimiter) beforeSave() {} +func (d *DirentCacheLimiter) beforeSave() {} -func (x *DirentCacheLimiter) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.count) { - state.Failf("count is %#v, expected zero", &x.count) +func (d *DirentCacheLimiter) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + if !state.IsZeroValue(&d.count) { + state.Failf("count is %#v, expected zero", &d.count) } - m.Save(0, &x.max) + stateSinkObject.Save(0, &d.max) } -func (x *DirentCacheLimiter) afterLoad() {} +func (d *DirentCacheLimiter) afterLoad() {} -func (x *DirentCacheLimiter) StateLoad(m state.Source) { - m.Load(0, &x.max) +func (d *DirentCacheLimiter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.max) } -func (x *direntList) StateTypeName() string { +func (d *direntList) StateTypeName() string { return "pkg/sentry/fs.direntList" } -func (x *direntList) StateFields() []string { +func (d *direntList) StateFields() []string { return []string{ "head", "tail", } } -func (x *direntList) beforeSave() {} +func (d *direntList) beforeSave() {} -func (x *direntList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (d *direntList) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.head) + stateSinkObject.Save(1, &d.tail) } -func (x *direntList) afterLoad() {} +func (d *direntList) afterLoad() {} -func (x *direntList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (d *direntList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.head) + stateSourceObject.Load(1, &d.tail) } -func (x *direntEntry) StateTypeName() string { +func (d *direntEntry) StateTypeName() string { return "pkg/sentry/fs.direntEntry" } -func (x *direntEntry) StateFields() []string { +func (d *direntEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *direntEntry) beforeSave() {} +func (d *direntEntry) beforeSave() {} -func (x *direntEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (d *direntEntry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.next) + stateSinkObject.Save(1, &d.prev) } -func (x *direntEntry) afterLoad() {} +func (d *direntEntry) afterLoad() {} -func (x *direntEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (d *direntEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.next) + stateSourceObject.Load(1, &d.prev) } -func (x *eventList) StateTypeName() string { +func (e *eventList) StateTypeName() string { return "pkg/sentry/fs.eventList" } -func (x *eventList) StateFields() []string { +func (e *eventList) StateFields() []string { return []string{ "head", "tail", } } -func (x *eventList) beforeSave() {} +func (e *eventList) beforeSave() {} -func (x *eventList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (e *eventList) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.head) + stateSinkObject.Save(1, &e.tail) } -func (x *eventList) afterLoad() {} +func (e *eventList) afterLoad() {} -func (x *eventList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (e *eventList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.head) + stateSourceObject.Load(1, &e.tail) } -func (x *eventEntry) StateTypeName() string { +func (e *eventEntry) StateTypeName() string { return "pkg/sentry/fs.eventEntry" } -func (x *eventEntry) StateFields() []string { +func (e *eventEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *eventEntry) beforeSave() {} +func (e *eventEntry) beforeSave() {} -func (x *eventEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *eventEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *eventEntry) afterLoad() {} +func (e *eventEntry) afterLoad() {} -func (x *eventEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *eventEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (x *File) StateTypeName() string { +func (f *File) StateTypeName() string { return "pkg/sentry/fs.File" } -func (x *File) StateFields() []string { +func (f *File) StateFields() []string { return []string{ "AtomicRefCount", "UniqueID", @@ -512,33 +512,33 @@ func (x *File) StateFields() []string { } } -func (x *File) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.UniqueID) - m.Save(2, &x.Dirent) - m.Save(3, &x.flags) - m.Save(4, &x.async) - m.Save(5, &x.FileOperations) - m.Save(6, &x.offset) +func (f *File) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.AtomicRefCount) + stateSinkObject.Save(1, &f.UniqueID) + stateSinkObject.Save(2, &f.Dirent) + stateSinkObject.Save(3, &f.flags) + stateSinkObject.Save(4, &f.async) + stateSinkObject.Save(5, &f.FileOperations) + stateSinkObject.Save(6, &f.offset) } -func (x *File) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.UniqueID) - m.Load(2, &x.Dirent) - m.Load(3, &x.flags) - m.Load(4, &x.async) - m.LoadWait(5, &x.FileOperations) - m.Load(6, &x.offset) - m.AfterLoad(x.afterLoad) +func (f *File) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.AtomicRefCount) + stateSourceObject.Load(1, &f.UniqueID) + stateSourceObject.Load(2, &f.Dirent) + stateSourceObject.Load(3, &f.flags) + stateSourceObject.Load(4, &f.async) + stateSourceObject.LoadWait(5, &f.FileOperations) + stateSourceObject.Load(6, &f.offset) + stateSourceObject.AfterLoad(f.afterLoad) } -func (x *overlayFileOperations) StateTypeName() string { +func (o *overlayFileOperations) StateTypeName() string { return "pkg/sentry/fs.overlayFileOperations" } -func (x *overlayFileOperations) StateFields() []string { +func (o *overlayFileOperations) StateFields() []string { return []string{ "upper", "lower", @@ -546,28 +546,28 @@ func (x *overlayFileOperations) StateFields() []string { } } -func (x *overlayFileOperations) beforeSave() {} +func (o *overlayFileOperations) beforeSave() {} -func (x *overlayFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.upper) - m.Save(1, &x.lower) - m.Save(2, &x.dirCursor) +func (o *overlayFileOperations) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.upper) + stateSinkObject.Save(1, &o.lower) + stateSinkObject.Save(2, &o.dirCursor) } -func (x *overlayFileOperations) afterLoad() {} +func (o *overlayFileOperations) afterLoad() {} -func (x *overlayFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.upper) - m.Load(1, &x.lower) - m.Load(2, &x.dirCursor) +func (o *overlayFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.upper) + stateSourceObject.Load(1, &o.lower) + stateSourceObject.Load(2, &o.dirCursor) } -func (x *overlayMappingIdentity) StateTypeName() string { +func (o *overlayMappingIdentity) StateTypeName() string { return "pkg/sentry/fs.overlayMappingIdentity" } -func (x *overlayMappingIdentity) StateFields() []string { +func (o *overlayMappingIdentity) StateFields() []string { return []string{ "AtomicRefCount", "id", @@ -575,28 +575,28 @@ func (x *overlayMappingIdentity) StateFields() []string { } } -func (x *overlayMappingIdentity) beforeSave() {} +func (o *overlayMappingIdentity) beforeSave() {} -func (x *overlayMappingIdentity) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.id) - m.Save(2, &x.overlayFile) +func (o *overlayMappingIdentity) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.AtomicRefCount) + stateSinkObject.Save(1, &o.id) + stateSinkObject.Save(2, &o.overlayFile) } -func (x *overlayMappingIdentity) afterLoad() {} +func (o *overlayMappingIdentity) afterLoad() {} -func (x *overlayMappingIdentity) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.id) - m.Load(2, &x.overlayFile) +func (o *overlayMappingIdentity) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.AtomicRefCount) + stateSourceObject.Load(1, &o.id) + stateSourceObject.Load(2, &o.overlayFile) } -func (x *MountSourceFlags) StateTypeName() string { +func (m *MountSourceFlags) StateTypeName() string { return "pkg/sentry/fs.MountSourceFlags" } -func (x *MountSourceFlags) StateFields() []string { +func (m *MountSourceFlags) StateFields() []string { return []string{ "ReadOnly", "NoAtime", @@ -605,30 +605,30 @@ func (x *MountSourceFlags) StateFields() []string { } } -func (x *MountSourceFlags) beforeSave() {} +func (m *MountSourceFlags) beforeSave() {} -func (x *MountSourceFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ReadOnly) - m.Save(1, &x.NoAtime) - m.Save(2, &x.ForcePageCache) - m.Save(3, &x.NoExec) +func (m *MountSourceFlags) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.ReadOnly) + stateSinkObject.Save(1, &m.NoAtime) + stateSinkObject.Save(2, &m.ForcePageCache) + stateSinkObject.Save(3, &m.NoExec) } -func (x *MountSourceFlags) afterLoad() {} +func (m *MountSourceFlags) afterLoad() {} -func (x *MountSourceFlags) StateLoad(m state.Source) { - m.Load(0, &x.ReadOnly) - m.Load(1, &x.NoAtime) - m.Load(2, &x.ForcePageCache) - m.Load(3, &x.NoExec) +func (m *MountSourceFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.ReadOnly) + stateSourceObject.Load(1, &m.NoAtime) + stateSourceObject.Load(2, &m.ForcePageCache) + stateSourceObject.Load(3, &m.NoExec) } -func (x *FileFlags) StateTypeName() string { +func (f *FileFlags) StateTypeName() string { return "pkg/sentry/fs.FileFlags" } -func (x *FileFlags) StateFields() []string { +func (f *FileFlags) StateFields() []string { return []string{ "Direct", "NonBlocking", @@ -647,50 +647,50 @@ func (x *FileFlags) StateFields() []string { } } -func (x *FileFlags) beforeSave() {} - -func (x *FileFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Direct) - m.Save(1, &x.NonBlocking) - m.Save(2, &x.DSync) - m.Save(3, &x.Sync) - m.Save(4, &x.Append) - m.Save(5, &x.Read) - m.Save(6, &x.Write) - m.Save(7, &x.Pread) - m.Save(8, &x.Pwrite) - m.Save(9, &x.Directory) - m.Save(10, &x.Async) - m.Save(11, &x.LargeFile) - m.Save(12, &x.NonSeekable) - m.Save(13, &x.Truncate) -} - -func (x *FileFlags) afterLoad() {} - -func (x *FileFlags) StateLoad(m state.Source) { - m.Load(0, &x.Direct) - m.Load(1, &x.NonBlocking) - m.Load(2, &x.DSync) - m.Load(3, &x.Sync) - m.Load(4, &x.Append) - m.Load(5, &x.Read) - m.Load(6, &x.Write) - m.Load(7, &x.Pread) - m.Load(8, &x.Pwrite) - m.Load(9, &x.Directory) - m.Load(10, &x.Async) - m.Load(11, &x.LargeFile) - m.Load(12, &x.NonSeekable) - m.Load(13, &x.Truncate) -} - -func (x *Inode) StateTypeName() string { +func (f *FileFlags) beforeSave() {} + +func (f *FileFlags) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Direct) + stateSinkObject.Save(1, &f.NonBlocking) + stateSinkObject.Save(2, &f.DSync) + stateSinkObject.Save(3, &f.Sync) + stateSinkObject.Save(4, &f.Append) + stateSinkObject.Save(5, &f.Read) + stateSinkObject.Save(6, &f.Write) + stateSinkObject.Save(7, &f.Pread) + stateSinkObject.Save(8, &f.Pwrite) + stateSinkObject.Save(9, &f.Directory) + stateSinkObject.Save(10, &f.Async) + stateSinkObject.Save(11, &f.LargeFile) + stateSinkObject.Save(12, &f.NonSeekable) + stateSinkObject.Save(13, &f.Truncate) +} + +func (f *FileFlags) afterLoad() {} + +func (f *FileFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Direct) + stateSourceObject.Load(1, &f.NonBlocking) + stateSourceObject.Load(2, &f.DSync) + stateSourceObject.Load(3, &f.Sync) + stateSourceObject.Load(4, &f.Append) + stateSourceObject.Load(5, &f.Read) + stateSourceObject.Load(6, &f.Write) + stateSourceObject.Load(7, &f.Pread) + stateSourceObject.Load(8, &f.Pwrite) + stateSourceObject.Load(9, &f.Directory) + stateSourceObject.Load(10, &f.Async) + stateSourceObject.Load(11, &f.LargeFile) + stateSourceObject.Load(12, &f.NonSeekable) + stateSourceObject.Load(13, &f.Truncate) +} + +func (i *Inode) StateTypeName() string { return "pkg/sentry/fs.Inode" } -func (x *Inode) StateFields() []string { +func (i *Inode) StateFields() []string { return []string{ "AtomicRefCount", "InodeOperations", @@ -702,88 +702,88 @@ func (x *Inode) StateFields() []string { } } -func (x *Inode) beforeSave() {} +func (i *Inode) beforeSave() {} -func (x *Inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.InodeOperations) - m.Save(2, &x.StableAttr) - m.Save(3, &x.LockCtx) - m.Save(4, &x.Watches) - m.Save(5, &x.MountSource) - m.Save(6, &x.overlay) +func (i *Inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.AtomicRefCount) + stateSinkObject.Save(1, &i.InodeOperations) + stateSinkObject.Save(2, &i.StableAttr) + stateSinkObject.Save(3, &i.LockCtx) + stateSinkObject.Save(4, &i.Watches) + stateSinkObject.Save(5, &i.MountSource) + stateSinkObject.Save(6, &i.overlay) } -func (x *Inode) afterLoad() {} +func (i *Inode) afterLoad() {} -func (x *Inode) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.InodeOperations) - m.Load(2, &x.StableAttr) - m.Load(3, &x.LockCtx) - m.Load(4, &x.Watches) - m.Load(5, &x.MountSource) - m.Load(6, &x.overlay) +func (i *Inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.AtomicRefCount) + stateSourceObject.Load(1, &i.InodeOperations) + stateSourceObject.Load(2, &i.StableAttr) + stateSourceObject.Load(3, &i.LockCtx) + stateSourceObject.Load(4, &i.Watches) + stateSourceObject.Load(5, &i.MountSource) + stateSourceObject.Load(6, &i.overlay) } -func (x *LockCtx) StateTypeName() string { +func (l *LockCtx) StateTypeName() string { return "pkg/sentry/fs.LockCtx" } -func (x *LockCtx) StateFields() []string { +func (l *LockCtx) StateFields() []string { return []string{ "Posix", "BSD", } } -func (x *LockCtx) beforeSave() {} +func (l *LockCtx) beforeSave() {} -func (x *LockCtx) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Posix) - m.Save(1, &x.BSD) +func (l *LockCtx) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Posix) + stateSinkObject.Save(1, &l.BSD) } -func (x *LockCtx) afterLoad() {} +func (l *LockCtx) afterLoad() {} -func (x *LockCtx) StateLoad(m state.Source) { - m.Load(0, &x.Posix) - m.Load(1, &x.BSD) +func (l *LockCtx) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Posix) + stateSourceObject.Load(1, &l.BSD) } -func (x *Watches) StateTypeName() string { +func (w *Watches) StateTypeName() string { return "pkg/sentry/fs.Watches" } -func (x *Watches) StateFields() []string { +func (w *Watches) StateFields() []string { return []string{ "ws", "unlinked", } } -func (x *Watches) beforeSave() {} +func (w *Watches) beforeSave() {} -func (x *Watches) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ws) - m.Save(1, &x.unlinked) +func (w *Watches) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.ws) + stateSinkObject.Save(1, &w.unlinked) } -func (x *Watches) afterLoad() {} +func (w *Watches) afterLoad() {} -func (x *Watches) StateLoad(m state.Source) { - m.Load(0, &x.ws) - m.Load(1, &x.unlinked) +func (w *Watches) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.ws) + stateSourceObject.Load(1, &w.unlinked) } -func (x *Inotify) StateTypeName() string { +func (i *Inotify) StateTypeName() string { return "pkg/sentry/fs.Inotify" } -func (x *Inotify) StateFields() []string { +func (i *Inotify) StateFields() []string { return []string{ "id", "events", @@ -793,32 +793,32 @@ func (x *Inotify) StateFields() []string { } } -func (x *Inotify) beforeSave() {} +func (i *Inotify) beforeSave() {} -func (x *Inotify) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.id) - m.Save(1, &x.events) - m.Save(2, &x.scratch) - m.Save(3, &x.nextWatch) - m.Save(4, &x.watches) +func (i *Inotify) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.id) + stateSinkObject.Save(1, &i.events) + stateSinkObject.Save(2, &i.scratch) + stateSinkObject.Save(3, &i.nextWatch) + stateSinkObject.Save(4, &i.watches) } -func (x *Inotify) afterLoad() {} +func (i *Inotify) afterLoad() {} -func (x *Inotify) StateLoad(m state.Source) { - m.Load(0, &x.id) - m.Load(1, &x.events) - m.Load(2, &x.scratch) - m.Load(3, &x.nextWatch) - m.Load(4, &x.watches) +func (i *Inotify) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.id) + stateSourceObject.Load(1, &i.events) + stateSourceObject.Load(2, &i.scratch) + stateSourceObject.Load(3, &i.nextWatch) + stateSourceObject.Load(4, &i.watches) } -func (x *Event) StateTypeName() string { +func (e *Event) StateTypeName() string { return "pkg/sentry/fs.Event" } -func (x *Event) StateFields() []string { +func (e *Event) StateFields() []string { return []string{ "eventEntry", "wd", @@ -829,34 +829,34 @@ func (x *Event) StateFields() []string { } } -func (x *Event) beforeSave() {} +func (e *Event) beforeSave() {} -func (x *Event) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.eventEntry) - m.Save(1, &x.wd) - m.Save(2, &x.mask) - m.Save(3, &x.cookie) - m.Save(4, &x.len) - m.Save(5, &x.name) +func (e *Event) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.eventEntry) + stateSinkObject.Save(1, &e.wd) + stateSinkObject.Save(2, &e.mask) + stateSinkObject.Save(3, &e.cookie) + stateSinkObject.Save(4, &e.len) + stateSinkObject.Save(5, &e.name) } -func (x *Event) afterLoad() {} +func (e *Event) afterLoad() {} -func (x *Event) StateLoad(m state.Source) { - m.Load(0, &x.eventEntry) - m.Load(1, &x.wd) - m.Load(2, &x.mask) - m.Load(3, &x.cookie) - m.Load(4, &x.len) - m.Load(5, &x.name) +func (e *Event) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.eventEntry) + stateSourceObject.Load(1, &e.wd) + stateSourceObject.Load(2, &e.mask) + stateSourceObject.Load(3, &e.cookie) + stateSourceObject.Load(4, &e.len) + stateSourceObject.Load(5, &e.name) } -func (x *Watch) StateTypeName() string { +func (w *Watch) StateTypeName() string { return "pkg/sentry/fs.Watch" } -func (x *Watch) StateFields() []string { +func (w *Watch) StateFields() []string { return []string{ "owner", "wd", @@ -867,34 +867,34 @@ func (x *Watch) StateFields() []string { } } -func (x *Watch) beforeSave() {} +func (w *Watch) beforeSave() {} -func (x *Watch) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.owner) - m.Save(1, &x.wd) - m.Save(2, &x.target) - m.Save(3, &x.unpinned) - m.Save(4, &x.mask) - m.Save(5, &x.pins) +func (w *Watch) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.owner) + stateSinkObject.Save(1, &w.wd) + stateSinkObject.Save(2, &w.target) + stateSinkObject.Save(3, &w.unpinned) + stateSinkObject.Save(4, &w.mask) + stateSinkObject.Save(5, &w.pins) } -func (x *Watch) afterLoad() {} +func (w *Watch) afterLoad() {} -func (x *Watch) StateLoad(m state.Source) { - m.Load(0, &x.owner) - m.Load(1, &x.wd) - m.Load(2, &x.target) - m.Load(3, &x.unpinned) - m.Load(4, &x.mask) - m.Load(5, &x.pins) +func (w *Watch) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.owner) + stateSourceObject.Load(1, &w.wd) + stateSourceObject.Load(2, &w.target) + stateSourceObject.Load(3, &w.unpinned) + stateSourceObject.Load(4, &w.mask) + stateSourceObject.Load(5, &w.pins) } -func (x *MountSource) StateTypeName() string { +func (m *MountSource) StateTypeName() string { return "pkg/sentry/fs.MountSource" } -func (x *MountSource) StateFields() []string { +func (m *MountSource) StateFields() []string { return []string{ "AtomicRefCount", "MountSourceOperations", @@ -905,34 +905,34 @@ func (x *MountSource) StateFields() []string { } } -func (x *MountSource) beforeSave() {} +func (m *MountSource) beforeSave() {} -func (x *MountSource) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.MountSourceOperations) - m.Save(2, &x.FilesystemType) - m.Save(3, &x.Flags) - m.Save(4, &x.fscache) - m.Save(5, &x.direntRefs) +func (m *MountSource) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.AtomicRefCount) + stateSinkObject.Save(1, &m.MountSourceOperations) + stateSinkObject.Save(2, &m.FilesystemType) + stateSinkObject.Save(3, &m.Flags) + stateSinkObject.Save(4, &m.fscache) + stateSinkObject.Save(5, &m.direntRefs) } -func (x *MountSource) afterLoad() {} +func (m *MountSource) afterLoad() {} -func (x *MountSource) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.MountSourceOperations) - m.Load(2, &x.FilesystemType) - m.Load(3, &x.Flags) - m.Load(4, &x.fscache) - m.Load(5, &x.direntRefs) +func (m *MountSource) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.AtomicRefCount) + stateSourceObject.Load(1, &m.MountSourceOperations) + stateSourceObject.Load(2, &m.FilesystemType) + stateSourceObject.Load(3, &m.Flags) + stateSourceObject.Load(4, &m.fscache) + stateSourceObject.Load(5, &m.direntRefs) } -func (x *SimpleMountSourceOperations) StateTypeName() string { +func (s *SimpleMountSourceOperations) StateTypeName() string { return "pkg/sentry/fs.SimpleMountSourceOperations" } -func (x *SimpleMountSourceOperations) StateFields() []string { +func (s *SimpleMountSourceOperations) StateFields() []string { return []string{ "keep", "revalidate", @@ -940,73 +940,73 @@ func (x *SimpleMountSourceOperations) StateFields() []string { } } -func (x *SimpleMountSourceOperations) beforeSave() {} +func (s *SimpleMountSourceOperations) beforeSave() {} -func (x *SimpleMountSourceOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.keep) - m.Save(1, &x.revalidate) - m.Save(2, &x.cacheReaddir) +func (s *SimpleMountSourceOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.keep) + stateSinkObject.Save(1, &s.revalidate) + stateSinkObject.Save(2, &s.cacheReaddir) } -func (x *SimpleMountSourceOperations) afterLoad() {} +func (s *SimpleMountSourceOperations) afterLoad() {} -func (x *SimpleMountSourceOperations) StateLoad(m state.Source) { - m.Load(0, &x.keep) - m.Load(1, &x.revalidate) - m.Load(2, &x.cacheReaddir) +func (s *SimpleMountSourceOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.keep) + stateSourceObject.Load(1, &s.revalidate) + stateSourceObject.Load(2, &s.cacheReaddir) } -func (x *overlayMountSourceOperations) StateTypeName() string { +func (o *overlayMountSourceOperations) StateTypeName() string { return "pkg/sentry/fs.overlayMountSourceOperations" } -func (x *overlayMountSourceOperations) StateFields() []string { +func (o *overlayMountSourceOperations) StateFields() []string { return []string{ "upper", "lower", } } -func (x *overlayMountSourceOperations) beforeSave() {} +func (o *overlayMountSourceOperations) beforeSave() {} -func (x *overlayMountSourceOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.upper) - m.Save(1, &x.lower) +func (o *overlayMountSourceOperations) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.upper) + stateSinkObject.Save(1, &o.lower) } -func (x *overlayMountSourceOperations) afterLoad() {} +func (o *overlayMountSourceOperations) afterLoad() {} -func (x *overlayMountSourceOperations) StateLoad(m state.Source) { - m.Load(0, &x.upper) - m.Load(1, &x.lower) +func (o *overlayMountSourceOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.upper) + stateSourceObject.Load(1, &o.lower) } -func (x *overlayFilesystem) StateTypeName() string { +func (o *overlayFilesystem) StateTypeName() string { return "pkg/sentry/fs.overlayFilesystem" } -func (x *overlayFilesystem) StateFields() []string { +func (o *overlayFilesystem) StateFields() []string { return []string{} } -func (x *overlayFilesystem) beforeSave() {} +func (o *overlayFilesystem) beforeSave() {} -func (x *overlayFilesystem) StateSave(m state.Sink) { - x.beforeSave() +func (o *overlayFilesystem) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *overlayFilesystem) afterLoad() {} +func (o *overlayFilesystem) afterLoad() {} -func (x *overlayFilesystem) StateLoad(m state.Source) { +func (o *overlayFilesystem) StateLoad(stateSourceObject state.Source) { } -func (x *Mount) StateTypeName() string { +func (m *Mount) StateTypeName() string { return "pkg/sentry/fs.Mount" } -func (x *Mount) StateFields() []string { +func (m *Mount) StateFields() []string { return []string{ "ID", "ParentID", @@ -1015,30 +1015,30 @@ func (x *Mount) StateFields() []string { } } -func (x *Mount) beforeSave() {} +func (m *Mount) beforeSave() {} -func (x *Mount) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ID) - m.Save(1, &x.ParentID) - m.Save(2, &x.root) - m.Save(3, &x.previous) +func (m *Mount) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.ID) + stateSinkObject.Save(1, &m.ParentID) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.previous) } -func (x *Mount) afterLoad() {} +func (m *Mount) afterLoad() {} -func (x *Mount) StateLoad(m state.Source) { - m.Load(0, &x.ID) - m.Load(1, &x.ParentID) - m.Load(2, &x.root) - m.Load(3, &x.previous) +func (m *Mount) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.ID) + stateSourceObject.Load(1, &m.ParentID) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.previous) } -func (x *MountNamespace) StateTypeName() string { +func (m *MountNamespace) StateTypeName() string { return "pkg/sentry/fs.MountNamespace" } -func (x *MountNamespace) StateFields() []string { +func (m *MountNamespace) StateFields() []string { return []string{ "AtomicRefCount", "userns", @@ -1048,32 +1048,32 @@ func (x *MountNamespace) StateFields() []string { } } -func (x *MountNamespace) beforeSave() {} +func (m *MountNamespace) beforeSave() {} -func (x *MountNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.userns) - m.Save(2, &x.root) - m.Save(3, &x.mounts) - m.Save(4, &x.mountID) +func (m *MountNamespace) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.AtomicRefCount) + stateSinkObject.Save(1, &m.userns) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.mounts) + stateSinkObject.Save(4, &m.mountID) } -func (x *MountNamespace) afterLoad() {} +func (m *MountNamespace) afterLoad() {} -func (x *MountNamespace) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.userns) - m.Load(2, &x.root) - m.Load(3, &x.mounts) - m.Load(4, &x.mountID) +func (m *MountNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.AtomicRefCount) + stateSourceObject.Load(1, &m.userns) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.mounts) + stateSourceObject.Load(4, &m.mountID) } -func (x *overlayEntry) StateTypeName() string { +func (o *overlayEntry) StateTypeName() string { return "pkg/sentry/fs.overlayEntry" } -func (x *overlayEntry) StateFields() []string { +func (o *overlayEntry) StateFields() []string { return []string{ "lowerExists", "lower", @@ -1083,25 +1083,25 @@ func (x *overlayEntry) StateFields() []string { } } -func (x *overlayEntry) beforeSave() {} +func (o *overlayEntry) beforeSave() {} -func (x *overlayEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.lowerExists) - m.Save(1, &x.lower) - m.Save(2, &x.mappings) - m.Save(3, &x.upper) - m.Save(4, &x.dirCache) +func (o *overlayEntry) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.lowerExists) + stateSinkObject.Save(1, &o.lower) + stateSinkObject.Save(2, &o.mappings) + stateSinkObject.Save(3, &o.upper) + stateSinkObject.Save(4, &o.dirCache) } -func (x *overlayEntry) afterLoad() {} +func (o *overlayEntry) afterLoad() {} -func (x *overlayEntry) StateLoad(m state.Source) { - m.Load(0, &x.lowerExists) - m.Load(1, &x.lower) - m.Load(2, &x.mappings) - m.Load(3, &x.upper) - m.Load(4, &x.dirCache) +func (o *overlayEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.lowerExists) + stateSourceObject.Load(1, &o.lower) + stateSourceObject.Load(2, &o.mappings) + stateSourceObject.Load(3, &o.upper) + stateSourceObject.Load(4, &o.dirCache) } func init() { diff --git a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go index b3270d11d..4d90bd42f 100644 --- a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go +++ b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go @@ -6,35 +6,35 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *DirtySet) StateTypeName() string { +func (d *DirtySet) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtySet" } -func (x *DirtySet) StateFields() []string { +func (d *DirtySet) StateFields() []string { return []string{ "root", } } -func (x *DirtySet) beforeSave() {} +func (d *DirtySet) beforeSave() {} -func (x *DirtySet) StateSave(m state.Sink) { - x.beforeSave() - var root *DirtySegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (d *DirtySet) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var rootValue *DirtySegmentDataSlices = d.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *DirtySet) afterLoad() {} +func (d *DirtySet) afterLoad() {} -func (x *DirtySet) StateLoad(m state.Source) { - m.LoadValue(0, new(*DirtySegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*DirtySegmentDataSlices)) }) +func (d *DirtySet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*DirtySegmentDataSlices), func(y interface{}) { d.loadRoot(y.(*DirtySegmentDataSlices)) }) } -func (x *Dirtynode) StateTypeName() string { +func (d *Dirtynode) StateTypeName() string { return "pkg/sentry/fs/fsutil.Dirtynode" } -func (x *Dirtynode) StateFields() []string { +func (d *Dirtynode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -47,38 +47,38 @@ func (x *Dirtynode) StateFields() []string { } } -func (x *Dirtynode) beforeSave() {} +func (d *Dirtynode) beforeSave() {} -func (x *Dirtynode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (d *Dirtynode) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.nrSegments) + stateSinkObject.Save(1, &d.parent) + stateSinkObject.Save(2, &d.parentIndex) + stateSinkObject.Save(3, &d.hasChildren) + stateSinkObject.Save(4, &d.maxGap) + stateSinkObject.Save(5, &d.keys) + stateSinkObject.Save(6, &d.values) + stateSinkObject.Save(7, &d.children) } -func (x *Dirtynode) afterLoad() {} +func (d *Dirtynode) afterLoad() {} -func (x *Dirtynode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (d *Dirtynode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.nrSegments) + stateSourceObject.Load(1, &d.parent) + stateSourceObject.Load(2, &d.parentIndex) + stateSourceObject.Load(3, &d.hasChildren) + stateSourceObject.Load(4, &d.maxGap) + stateSourceObject.Load(5, &d.keys) + stateSourceObject.Load(6, &d.values) + stateSourceObject.Load(7, &d.children) } -func (x *DirtySegmentDataSlices) StateTypeName() string { +func (d *DirtySegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtySegmentDataSlices" } -func (x *DirtySegmentDataSlices) StateFields() []string { +func (d *DirtySegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -86,52 +86,52 @@ func (x *DirtySegmentDataSlices) StateFields() []string { } } -func (x *DirtySegmentDataSlices) beforeSave() {} +func (d *DirtySegmentDataSlices) beforeSave() {} -func (x *DirtySegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (d *DirtySegmentDataSlices) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Start) + stateSinkObject.Save(1, &d.End) + stateSinkObject.Save(2, &d.Values) } -func (x *DirtySegmentDataSlices) afterLoad() {} +func (d *DirtySegmentDataSlices) afterLoad() {} -func (x *DirtySegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (d *DirtySegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Start) + stateSourceObject.Load(1, &d.End) + stateSourceObject.Load(2, &d.Values) } -func (x *FileRangeSet) StateTypeName() string { +func (f *FileRangeSet) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangeSet" } -func (x *FileRangeSet) StateFields() []string { +func (f *FileRangeSet) StateFields() []string { return []string{ "root", } } -func (x *FileRangeSet) beforeSave() {} +func (f *FileRangeSet) beforeSave() {} -func (x *FileRangeSet) StateSave(m state.Sink) { - x.beforeSave() - var root *FileRangeSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (f *FileRangeSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var rootValue *FileRangeSegmentDataSlices = f.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *FileRangeSet) afterLoad() {} +func (f *FileRangeSet) afterLoad() {} -func (x *FileRangeSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*FileRangeSegmentDataSlices)) }) +func (f *FileRangeSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y interface{}) { f.loadRoot(y.(*FileRangeSegmentDataSlices)) }) } -func (x *FileRangenode) StateTypeName() string { +func (f *FileRangenode) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangenode" } -func (x *FileRangenode) StateFields() []string { +func (f *FileRangenode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -144,38 +144,38 @@ func (x *FileRangenode) StateFields() []string { } } -func (x *FileRangenode) beforeSave() {} +func (f *FileRangenode) beforeSave() {} -func (x *FileRangenode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (f *FileRangenode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.nrSegments) + stateSinkObject.Save(1, &f.parent) + stateSinkObject.Save(2, &f.parentIndex) + stateSinkObject.Save(3, &f.hasChildren) + stateSinkObject.Save(4, &f.maxGap) + stateSinkObject.Save(5, &f.keys) + stateSinkObject.Save(6, &f.values) + stateSinkObject.Save(7, &f.children) } -func (x *FileRangenode) afterLoad() {} +func (f *FileRangenode) afterLoad() {} -func (x *FileRangenode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (f *FileRangenode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.nrSegments) + stateSourceObject.Load(1, &f.parent) + stateSourceObject.Load(2, &f.parentIndex) + stateSourceObject.Load(3, &f.hasChildren) + stateSourceObject.Load(4, &f.maxGap) + stateSourceObject.Load(5, &f.keys) + stateSourceObject.Load(6, &f.values) + stateSourceObject.Load(7, &f.children) } -func (x *FileRangeSegmentDataSlices) StateTypeName() string { +func (f *FileRangeSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangeSegmentDataSlices" } -func (x *FileRangeSegmentDataSlices) StateFields() []string { +func (f *FileRangeSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -183,52 +183,52 @@ func (x *FileRangeSegmentDataSlices) StateFields() []string { } } -func (x *FileRangeSegmentDataSlices) beforeSave() {} +func (f *FileRangeSegmentDataSlices) beforeSave() {} -func (x *FileRangeSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (f *FileRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) + stateSinkObject.Save(2, &f.Values) } -func (x *FileRangeSegmentDataSlices) afterLoad() {} +func (f *FileRangeSegmentDataSlices) afterLoad() {} -func (x *FileRangeSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (f *FileRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) + stateSourceObject.Load(2, &f.Values) } -func (x *FrameRefSet) StateTypeName() string { +func (f *FrameRefSet) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefSet" } -func (x *FrameRefSet) StateFields() []string { +func (f *FrameRefSet) StateFields() []string { return []string{ "root", } } -func (x *FrameRefSet) beforeSave() {} +func (f *FrameRefSet) beforeSave() {} -func (x *FrameRefSet) StateSave(m state.Sink) { - x.beforeSave() - var root *FrameRefSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (f *FrameRefSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var rootValue *FrameRefSegmentDataSlices = f.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *FrameRefSet) afterLoad() {} +func (f *FrameRefSet) afterLoad() {} -func (x *FrameRefSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*FrameRefSegmentDataSlices)) }) +func (f *FrameRefSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y interface{}) { f.loadRoot(y.(*FrameRefSegmentDataSlices)) }) } -func (x *FrameRefnode) StateTypeName() string { +func (f *FrameRefnode) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefnode" } -func (x *FrameRefnode) StateFields() []string { +func (f *FrameRefnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -241,38 +241,38 @@ func (x *FrameRefnode) StateFields() []string { } } -func (x *FrameRefnode) beforeSave() {} +func (f *FrameRefnode) beforeSave() {} -func (x *FrameRefnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (f *FrameRefnode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.nrSegments) + stateSinkObject.Save(1, &f.parent) + stateSinkObject.Save(2, &f.parentIndex) + stateSinkObject.Save(3, &f.hasChildren) + stateSinkObject.Save(4, &f.maxGap) + stateSinkObject.Save(5, &f.keys) + stateSinkObject.Save(6, &f.values) + stateSinkObject.Save(7, &f.children) } -func (x *FrameRefnode) afterLoad() {} +func (f *FrameRefnode) afterLoad() {} -func (x *FrameRefnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (f *FrameRefnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.nrSegments) + stateSourceObject.Load(1, &f.parent) + stateSourceObject.Load(2, &f.parentIndex) + stateSourceObject.Load(3, &f.hasChildren) + stateSourceObject.Load(4, &f.maxGap) + stateSourceObject.Load(5, &f.keys) + stateSourceObject.Load(6, &f.values) + stateSourceObject.Load(7, &f.children) } -func (x *FrameRefSegmentDataSlices) StateTypeName() string { +func (f *FrameRefSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefSegmentDataSlices" } -func (x *FrameRefSegmentDataSlices) StateFields() []string { +func (f *FrameRefSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -280,21 +280,21 @@ func (x *FrameRefSegmentDataSlices) StateFields() []string { } } -func (x *FrameRefSegmentDataSlices) beforeSave() {} +func (f *FrameRefSegmentDataSlices) beforeSave() {} -func (x *FrameRefSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (f *FrameRefSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) + stateSinkObject.Save(2, &f.Values) } -func (x *FrameRefSegmentDataSlices) afterLoad() {} +func (f *FrameRefSegmentDataSlices) afterLoad() {} -func (x *FrameRefSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (f *FrameRefSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) + stateSourceObject.Load(2, &f.Values) } func init() { diff --git a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go index 8e2a4c961..43016f689 100644 --- a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go +++ b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go @@ -6,124 +6,124 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *DirtyInfo) StateTypeName() string { +func (d *DirtyInfo) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtyInfo" } -func (x *DirtyInfo) StateFields() []string { +func (d *DirtyInfo) StateFields() []string { return []string{ "Keep", } } -func (x *DirtyInfo) beforeSave() {} +func (d *DirtyInfo) beforeSave() {} -func (x *DirtyInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Keep) +func (d *DirtyInfo) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Keep) } -func (x *DirtyInfo) afterLoad() {} +func (d *DirtyInfo) afterLoad() {} -func (x *DirtyInfo) StateLoad(m state.Source) { - m.Load(0, &x.Keep) +func (d *DirtyInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Keep) } -func (x *StaticDirFileOperations) StateTypeName() string { +func (s *StaticDirFileOperations) StateTypeName() string { return "pkg/sentry/fs/fsutil.StaticDirFileOperations" } -func (x *StaticDirFileOperations) StateFields() []string { +func (s *StaticDirFileOperations) StateFields() []string { return []string{ "dentryMap", "dirCursor", } } -func (x *StaticDirFileOperations) beforeSave() {} +func (s *StaticDirFileOperations) beforeSave() {} -func (x *StaticDirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dentryMap) - m.Save(1, &x.dirCursor) +func (s *StaticDirFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.dentryMap) + stateSinkObject.Save(1, &s.dirCursor) } -func (x *StaticDirFileOperations) afterLoad() {} +func (s *StaticDirFileOperations) afterLoad() {} -func (x *StaticDirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.dentryMap) - m.Load(1, &x.dirCursor) +func (s *StaticDirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.dentryMap) + stateSourceObject.Load(1, &s.dirCursor) } -func (x *NoReadWriteFile) StateTypeName() string { +func (n *NoReadWriteFile) StateTypeName() string { return "pkg/sentry/fs/fsutil.NoReadWriteFile" } -func (x *NoReadWriteFile) StateFields() []string { +func (n *NoReadWriteFile) StateFields() []string { return []string{} } -func (x *NoReadWriteFile) beforeSave() {} +func (n *NoReadWriteFile) beforeSave() {} -func (x *NoReadWriteFile) StateSave(m state.Sink) { - x.beforeSave() +func (n *NoReadWriteFile) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *NoReadWriteFile) afterLoad() {} +func (n *NoReadWriteFile) afterLoad() {} -func (x *NoReadWriteFile) StateLoad(m state.Source) { +func (n *NoReadWriteFile) StateLoad(stateSourceObject state.Source) { } -func (x *FileStaticContentReader) StateTypeName() string { +func (f *FileStaticContentReader) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileStaticContentReader" } -func (x *FileStaticContentReader) StateFields() []string { +func (f *FileStaticContentReader) StateFields() []string { return []string{ "content", } } -func (x *FileStaticContentReader) beforeSave() {} +func (f *FileStaticContentReader) beforeSave() {} -func (x *FileStaticContentReader) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.content) +func (f *FileStaticContentReader) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.content) } -func (x *FileStaticContentReader) afterLoad() {} +func (f *FileStaticContentReader) afterLoad() {} -func (x *FileStaticContentReader) StateLoad(m state.Source) { - m.Load(0, &x.content) +func (f *FileStaticContentReader) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.content) } -func (x *HostFileMapper) StateTypeName() string { +func (h *HostFileMapper) StateTypeName() string { return "pkg/sentry/fs/fsutil.HostFileMapper" } -func (x *HostFileMapper) StateFields() []string { +func (h *HostFileMapper) StateFields() []string { return []string{ "refs", } } -func (x *HostFileMapper) beforeSave() {} +func (h *HostFileMapper) beforeSave() {} -func (x *HostFileMapper) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refs) +func (h *HostFileMapper) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.refs) } -func (x *HostFileMapper) StateLoad(m state.Source) { - m.Load(0, &x.refs) - m.AfterLoad(x.afterLoad) +func (h *HostFileMapper) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.refs) + stateSourceObject.AfterLoad(h.afterLoad) } -func (x *HostMappable) StateTypeName() string { +func (h *HostMappable) StateTypeName() string { return "pkg/sentry/fs/fsutil.HostMappable" } -func (x *HostMappable) StateFields() []string { +func (h *HostMappable) StateFields() []string { return []string{ "hostFileMapper", "backingFile", @@ -131,169 +131,169 @@ func (x *HostMappable) StateFields() []string { } } -func (x *HostMappable) beforeSave() {} +func (h *HostMappable) beforeSave() {} -func (x *HostMappable) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.hostFileMapper) - m.Save(1, &x.backingFile) - m.Save(2, &x.mappings) +func (h *HostMappable) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.hostFileMapper) + stateSinkObject.Save(1, &h.backingFile) + stateSinkObject.Save(2, &h.mappings) } -func (x *HostMappable) afterLoad() {} +func (h *HostMappable) afterLoad() {} -func (x *HostMappable) StateLoad(m state.Source) { - m.Load(0, &x.hostFileMapper) - m.Load(1, &x.backingFile) - m.Load(2, &x.mappings) +func (h *HostMappable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.hostFileMapper) + stateSourceObject.Load(1, &h.backingFile) + stateSourceObject.Load(2, &h.mappings) } -func (x *SimpleFileInode) StateTypeName() string { +func (s *SimpleFileInode) StateTypeName() string { return "pkg/sentry/fs/fsutil.SimpleFileInode" } -func (x *SimpleFileInode) StateFields() []string { +func (s *SimpleFileInode) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *SimpleFileInode) beforeSave() {} +func (s *SimpleFileInode) beforeSave() {} -func (x *SimpleFileInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (s *SimpleFileInode) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) } -func (x *SimpleFileInode) afterLoad() {} +func (s *SimpleFileInode) afterLoad() {} -func (x *SimpleFileInode) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (s *SimpleFileInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) } -func (x *NoReadWriteFileInode) StateTypeName() string { +func (n *NoReadWriteFileInode) StateTypeName() string { return "pkg/sentry/fs/fsutil.NoReadWriteFileInode" } -func (x *NoReadWriteFileInode) StateFields() []string { +func (n *NoReadWriteFileInode) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *NoReadWriteFileInode) beforeSave() {} +func (n *NoReadWriteFileInode) beforeSave() {} -func (x *NoReadWriteFileInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *NoReadWriteFileInode) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *NoReadWriteFileInode) afterLoad() {} +func (n *NoReadWriteFileInode) afterLoad() {} -func (x *NoReadWriteFileInode) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *NoReadWriteFileInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *InodeSimpleAttributes) StateTypeName() string { +func (i *InodeSimpleAttributes) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeSimpleAttributes" } -func (x *InodeSimpleAttributes) StateFields() []string { +func (i *InodeSimpleAttributes) StateFields() []string { return []string{ "fsType", "unstable", } } -func (x *InodeSimpleAttributes) beforeSave() {} +func (i *InodeSimpleAttributes) beforeSave() {} -func (x *InodeSimpleAttributes) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fsType) - m.Save(1, &x.unstable) +func (i *InodeSimpleAttributes) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fsType) + stateSinkObject.Save(1, &i.unstable) } -func (x *InodeSimpleAttributes) afterLoad() {} +func (i *InodeSimpleAttributes) afterLoad() {} -func (x *InodeSimpleAttributes) StateLoad(m state.Source) { - m.Load(0, &x.fsType) - m.Load(1, &x.unstable) +func (i *InodeSimpleAttributes) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.fsType) + stateSourceObject.Load(1, &i.unstable) } -func (x *InodeSimpleExtendedAttributes) StateTypeName() string { +func (i *InodeSimpleExtendedAttributes) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeSimpleExtendedAttributes" } -func (x *InodeSimpleExtendedAttributes) StateFields() []string { +func (i *InodeSimpleExtendedAttributes) StateFields() []string { return []string{ "xattrs", } } -func (x *InodeSimpleExtendedAttributes) beforeSave() {} +func (i *InodeSimpleExtendedAttributes) beforeSave() {} -func (x *InodeSimpleExtendedAttributes) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.xattrs) +func (i *InodeSimpleExtendedAttributes) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.xattrs) } -func (x *InodeSimpleExtendedAttributes) afterLoad() {} +func (i *InodeSimpleExtendedAttributes) afterLoad() {} -func (x *InodeSimpleExtendedAttributes) StateLoad(m state.Source) { - m.Load(0, &x.xattrs) +func (i *InodeSimpleExtendedAttributes) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.xattrs) } -func (x *staticFile) StateTypeName() string { +func (s *staticFile) StateTypeName() string { return "pkg/sentry/fs/fsutil.staticFile" } -func (x *staticFile) StateFields() []string { +func (s *staticFile) StateFields() []string { return []string{ "FileStaticContentReader", } } -func (x *staticFile) beforeSave() {} +func (s *staticFile) beforeSave() {} -func (x *staticFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileStaticContentReader) +func (s *staticFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.FileStaticContentReader) } -func (x *staticFile) afterLoad() {} +func (s *staticFile) afterLoad() {} -func (x *staticFile) StateLoad(m state.Source) { - m.Load(0, &x.FileStaticContentReader) +func (s *staticFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.FileStaticContentReader) } -func (x *InodeStaticFileGetter) StateTypeName() string { +func (i *InodeStaticFileGetter) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeStaticFileGetter" } -func (x *InodeStaticFileGetter) StateFields() []string { +func (i *InodeStaticFileGetter) StateFields() []string { return []string{ "Contents", } } -func (x *InodeStaticFileGetter) beforeSave() {} +func (i *InodeStaticFileGetter) beforeSave() {} -func (x *InodeStaticFileGetter) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Contents) +func (i *InodeStaticFileGetter) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Contents) } -func (x *InodeStaticFileGetter) afterLoad() {} +func (i *InodeStaticFileGetter) afterLoad() {} -func (x *InodeStaticFileGetter) StateLoad(m state.Source) { - m.Load(0, &x.Contents) +func (i *InodeStaticFileGetter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Contents) } -func (x *CachingInodeOperations) StateTypeName() string { +func (c *CachingInodeOperations) StateTypeName() string { return "pkg/sentry/fs/fsutil.CachingInodeOperations" } -func (x *CachingInodeOperations) StateFields() []string { +func (c *CachingInodeOperations) StateFields() []string { return []string{ "backingFile", "mfp", @@ -308,61 +308,61 @@ func (x *CachingInodeOperations) StateFields() []string { } } -func (x *CachingInodeOperations) beforeSave() {} +func (c *CachingInodeOperations) beforeSave() {} -func (x *CachingInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.backingFile) - m.Save(1, &x.mfp) - m.Save(2, &x.opts) - m.Save(3, &x.attr) - m.Save(4, &x.dirtyAttr) - m.Save(5, &x.mappings) - m.Save(6, &x.cache) - m.Save(7, &x.dirty) - m.Save(8, &x.hostFileMapper) - m.Save(9, &x.refs) +func (c *CachingInodeOperations) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.backingFile) + stateSinkObject.Save(1, &c.mfp) + stateSinkObject.Save(2, &c.opts) + stateSinkObject.Save(3, &c.attr) + stateSinkObject.Save(4, &c.dirtyAttr) + stateSinkObject.Save(5, &c.mappings) + stateSinkObject.Save(6, &c.cache) + stateSinkObject.Save(7, &c.dirty) + stateSinkObject.Save(8, &c.hostFileMapper) + stateSinkObject.Save(9, &c.refs) } -func (x *CachingInodeOperations) afterLoad() {} +func (c *CachingInodeOperations) afterLoad() {} -func (x *CachingInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.backingFile) - m.Load(1, &x.mfp) - m.Load(2, &x.opts) - m.Load(3, &x.attr) - m.Load(4, &x.dirtyAttr) - m.Load(5, &x.mappings) - m.Load(6, &x.cache) - m.Load(7, &x.dirty) - m.Load(8, &x.hostFileMapper) - m.Load(9, &x.refs) +func (c *CachingInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.backingFile) + stateSourceObject.Load(1, &c.mfp) + stateSourceObject.Load(2, &c.opts) + stateSourceObject.Load(3, &c.attr) + stateSourceObject.Load(4, &c.dirtyAttr) + stateSourceObject.Load(5, &c.mappings) + stateSourceObject.Load(6, &c.cache) + stateSourceObject.Load(7, &c.dirty) + stateSourceObject.Load(8, &c.hostFileMapper) + stateSourceObject.Load(9, &c.refs) } -func (x *CachingInodeOperationsOptions) StateTypeName() string { +func (c *CachingInodeOperationsOptions) StateTypeName() string { return "pkg/sentry/fs/fsutil.CachingInodeOperationsOptions" } -func (x *CachingInodeOperationsOptions) StateFields() []string { +func (c *CachingInodeOperationsOptions) StateFields() []string { return []string{ "ForcePageCache", "LimitHostFDTranslation", } } -func (x *CachingInodeOperationsOptions) beforeSave() {} +func (c *CachingInodeOperationsOptions) beforeSave() {} -func (x *CachingInodeOperationsOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ForcePageCache) - m.Save(1, &x.LimitHostFDTranslation) +func (c *CachingInodeOperationsOptions) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.ForcePageCache) + stateSinkObject.Save(1, &c.LimitHostFDTranslation) } -func (x *CachingInodeOperationsOptions) afterLoad() {} +func (c *CachingInodeOperationsOptions) afterLoad() {} -func (x *CachingInodeOperationsOptions) StateLoad(m state.Source) { - m.Load(0, &x.ForcePageCache) - m.Load(1, &x.LimitHostFDTranslation) +func (c *CachingInodeOperationsOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.ForcePageCache) + stateSourceObject.Load(1, &c.LimitHostFDTranslation) } func init() { diff --git a/pkg/sentry/fs/fsutil/inode_cached.go b/pkg/sentry/fs/fsutil/inode_cached.go index 9eb6f522e..85a23432b 100644 --- a/pkg/sentry/fs/fsutil/inode_cached.go +++ b/pkg/sentry/fs/fsutil/inode_cached.go @@ -22,7 +22,6 @@ import ( "gvisor.dev/gvisor/pkg/log" "gvisor.dev/gvisor/pkg/safemem" "gvisor.dev/gvisor/pkg/sentry/fs" - "gvisor.dev/gvisor/pkg/sentry/kernel/time" ktime "gvisor.dev/gvisor/pkg/sentry/kernel/time" "gvisor.dev/gvisor/pkg/sentry/memmap" "gvisor.dev/gvisor/pkg/sentry/pgalloc" @@ -444,7 +443,7 @@ func (c *CachingInodeOperations) TouchAccessTime(ctx context.Context, inode *fs. // time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchAccessTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchAccessTimeLocked(now ktime.Time) { c.attr.AccessTime = now c.dirtyAttr.AccessTime = true } @@ -461,7 +460,7 @@ func (c *CachingInodeOperations) TouchModificationAndStatusChangeTime(ctx contex // and status change times in-place to the current time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchModificationAndStatusChangeTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchModificationAndStatusChangeTimeLocked(now ktime.Time) { c.attr.ModificationTime = now c.dirtyAttr.ModificationTime = true c.attr.StatusChangeTime = now @@ -480,7 +479,7 @@ func (c *CachingInodeOperations) TouchStatusChangeTime(ctx context.Context) { // in-place to the current time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchStatusChangeTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchStatusChangeTimeLocked(now ktime.Time) { c.attr.StatusChangeTime = now c.dirtyAttr.StatusChangeTime = true } @@ -672,9 +671,6 @@ func (rw *inodeReadWriter) ReadToBlocks(dsts safemem.BlockSeq) (uint64, error) { // Continue. seg, gap = gap.NextSegment(), FileRangeGapIterator{} } - - default: - break } } unlock() @@ -768,9 +764,6 @@ func (rw *inodeReadWriter) WriteFromBlocks(srcs safemem.BlockSeq) (uint64, error // Continue. seg, gap = gap.NextSegment(), FileRangeGapIterator{} - - default: - break } } rw.maybeGrowFile() diff --git a/pkg/sentry/fs/gofer/gofer_state_autogen.go b/pkg/sentry/fs/gofer/gofer_state_autogen.go index 1f7360ec8..c3cad4ad5 100644 --- a/pkg/sentry/fs/gofer/gofer_state_autogen.go +++ b/pkg/sentry/fs/gofer/gofer_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *fifo) StateTypeName() string { +func (f *fifo) StateTypeName() string { return "pkg/sentry/fs/gofer.fifo" } -func (x *fifo) StateFields() []string { +func (f *fifo) StateFields() []string { return []string{ "InodeOperations", "fileIops", } } -func (x *fifo) beforeSave() {} +func (f *fifo) beforeSave() {} -func (x *fifo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) - m.Save(1, &x.fileIops) +func (f *fifo) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeOperations) + stateSinkObject.Save(1, &f.fileIops) } -func (x *fifo) afterLoad() {} +func (f *fifo) afterLoad() {} -func (x *fifo) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) - m.Load(1, &x.fileIops) +func (f *fifo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeOperations) + stateSourceObject.Load(1, &f.fileIops) } -func (x *fileOperations) StateTypeName() string { +func (f *fileOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.fileOperations" } -func (x *fileOperations) StateFields() []string { +func (f *fileOperations) StateFields() []string { return []string{ "inodeOperations", "dirCursor", @@ -44,72 +44,72 @@ func (x *fileOperations) StateFields() []string { } } -func (x *fileOperations) beforeSave() {} +func (f *fileOperations) beforeSave() {} -func (x *fileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inodeOperations) - m.Save(1, &x.dirCursor) - m.Save(2, &x.flags) +func (f *fileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.inodeOperations) + stateSinkObject.Save(1, &f.dirCursor) + stateSinkObject.Save(2, &f.flags) } -func (x *fileOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.inodeOperations) - m.Load(1, &x.dirCursor) - m.LoadWait(2, &x.flags) - m.AfterLoad(x.afterLoad) +func (f *fileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &f.inodeOperations) + stateSourceObject.Load(1, &f.dirCursor) + stateSourceObject.LoadWait(2, &f.flags) + stateSourceObject.AfterLoad(f.afterLoad) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/gofer.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *inodeOperations) StateTypeName() string { +func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeOperations" } -func (x *inodeOperations) StateFields() []string { +func (i *inodeOperations) StateFields() []string { return []string{ "fileState", "cachingInodeOps", } } -func (x *inodeOperations) beforeSave() {} +func (i *inodeOperations) beforeSave() {} -func (x *inodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileState) - m.Save(1, &x.cachingInodeOps) +func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fileState) + stateSinkObject.Save(1, &i.cachingInodeOps) } -func (x *inodeOperations) afterLoad() {} +func (i *inodeOperations) afterLoad() {} -func (x *inodeOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.fileState) - m.Load(1, &x.cachingInodeOps) +func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.fileState) + stateSourceObject.Load(1, &i.cachingInodeOps) } -func (x *inodeFileState) StateTypeName() string { +func (i *inodeFileState) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeFileState" } -func (x *inodeFileState) StateFields() []string { +func (i *inodeFileState) StateFields() []string { return []string{ "s", "sattr", @@ -119,30 +119,30 @@ func (x *inodeFileState) StateFields() []string { } } -func (x *inodeFileState) StateSave(m state.Sink) { - x.beforeSave() - var loading struct{} = x.saveLoading() - m.SaveValue(2, loading) - m.Save(0, &x.s) - m.Save(1, &x.sattr) - m.Save(3, &x.savedUAttr) - m.Save(4, &x.hostMappable) +func (i *inodeFileState) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + var loadingValue struct{} = i.saveLoading() + stateSinkObject.SaveValue(2, loadingValue) + stateSinkObject.Save(0, &i.s) + stateSinkObject.Save(1, &i.sattr) + stateSinkObject.Save(3, &i.savedUAttr) + stateSinkObject.Save(4, &i.hostMappable) } -func (x *inodeFileState) StateLoad(m state.Source) { - m.LoadWait(0, &x.s) - m.LoadWait(1, &x.sattr) - m.Load(3, &x.savedUAttr) - m.Load(4, &x.hostMappable) - m.LoadValue(2, new(struct{}), func(y interface{}) { x.loadLoading(y.(struct{})) }) - m.AfterLoad(x.afterLoad) +func (i *inodeFileState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.s) + stateSourceObject.LoadWait(1, &i.sattr) + stateSourceObject.Load(3, &i.savedUAttr) + stateSourceObject.Load(4, &i.hostMappable) + stateSourceObject.LoadValue(2, new(struct{}), func(y interface{}) { i.loadLoading(y.(struct{})) }) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *overrideInfo) StateTypeName() string { +func (o *overrideInfo) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideInfo" } -func (x *overrideInfo) StateFields() []string { +func (o *overrideInfo) StateFields() []string { return []string{ "dirent", "endpoint", @@ -150,51 +150,51 @@ func (x *overrideInfo) StateFields() []string { } } -func (x *overrideInfo) beforeSave() {} +func (o *overrideInfo) beforeSave() {} -func (x *overrideInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dirent) - m.Save(1, &x.endpoint) - m.Save(2, &x.inode) +func (o *overrideInfo) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.dirent) + stateSinkObject.Save(1, &o.endpoint) + stateSinkObject.Save(2, &o.inode) } -func (x *overrideInfo) afterLoad() {} +func (o *overrideInfo) afterLoad() {} -func (x *overrideInfo) StateLoad(m state.Source) { - m.Load(0, &x.dirent) - m.Load(1, &x.endpoint) - m.Load(2, &x.inode) +func (o *overrideInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.dirent) + stateSourceObject.Load(1, &o.endpoint) + stateSourceObject.Load(2, &o.inode) } -func (x *overrideMaps) StateTypeName() string { +func (o *overrideMaps) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideMaps" } -func (x *overrideMaps) StateFields() []string { +func (o *overrideMaps) StateFields() []string { return []string{ "pathMap", } } -func (x *overrideMaps) beforeSave() {} +func (o *overrideMaps) beforeSave() {} -func (x *overrideMaps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pathMap) +func (o *overrideMaps) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.pathMap) } -func (x *overrideMaps) afterLoad() {} +func (o *overrideMaps) afterLoad() {} -func (x *overrideMaps) StateLoad(m state.Source) { - m.Load(0, &x.pathMap) +func (o *overrideMaps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.pathMap) } -func (x *session) StateTypeName() string { +func (s *session) StateTypeName() string { return "pkg/sentry/fs/gofer.session" } -func (x *session) StateFields() []string { +func (s *session) StateFields() []string { return []string{ "AtomicRefCount", "msize", @@ -211,36 +211,36 @@ func (x *session) StateFields() []string { } } -func (x *session) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.msize) - m.Save(2, &x.version) - m.Save(3, &x.cachePolicy) - m.Save(4, &x.aname) - m.Save(5, &x.superBlockFlags) - m.Save(6, &x.limitHostFDTranslation) - m.Save(7, &x.overlayfsStaleRead) - m.Save(8, &x.connID) - m.Save(9, &x.inodeMappings) - m.Save(10, &x.mounter) - m.Save(11, &x.overrides) -} - -func (x *session) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.LoadWait(1, &x.msize) - m.LoadWait(2, &x.version) - m.LoadWait(3, &x.cachePolicy) - m.LoadWait(4, &x.aname) - m.LoadWait(5, &x.superBlockFlags) - m.Load(6, &x.limitHostFDTranslation) - m.Load(7, &x.overlayfsStaleRead) - m.LoadWait(8, &x.connID) - m.LoadWait(9, &x.inodeMappings) - m.LoadWait(10, &x.mounter) - m.LoadWait(11, &x.overrides) - m.AfterLoad(x.afterLoad) +func (s *session) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.AtomicRefCount) + stateSinkObject.Save(1, &s.msize) + stateSinkObject.Save(2, &s.version) + stateSinkObject.Save(3, &s.cachePolicy) + stateSinkObject.Save(4, &s.aname) + stateSinkObject.Save(5, &s.superBlockFlags) + stateSinkObject.Save(6, &s.limitHostFDTranslation) + stateSinkObject.Save(7, &s.overlayfsStaleRead) + stateSinkObject.Save(8, &s.connID) + stateSinkObject.Save(9, &s.inodeMappings) + stateSinkObject.Save(10, &s.mounter) + stateSinkObject.Save(11, &s.overrides) +} + +func (s *session) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.AtomicRefCount) + stateSourceObject.LoadWait(1, &s.msize) + stateSourceObject.LoadWait(2, &s.version) + stateSourceObject.LoadWait(3, &s.cachePolicy) + stateSourceObject.LoadWait(4, &s.aname) + stateSourceObject.LoadWait(5, &s.superBlockFlags) + stateSourceObject.Load(6, &s.limitHostFDTranslation) + stateSourceObject.Load(7, &s.overlayfsStaleRead) + stateSourceObject.LoadWait(8, &s.connID) + stateSourceObject.LoadWait(9, &s.inodeMappings) + stateSourceObject.LoadWait(10, &s.mounter) + stateSourceObject.LoadWait(11, &s.overrides) + stateSourceObject.AfterLoad(s.afterLoad) } func init() { diff --git a/pkg/sentry/fs/host/host_state_autogen.go b/pkg/sentry/fs/host/host_state_autogen.go index 6a1a75ca4..baae8fffa 100644 --- a/pkg/sentry/fs/host/host_state_autogen.go +++ b/pkg/sentry/fs/host/host_state_autogen.go @@ -6,105 +6,105 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *descriptor) StateTypeName() string { +func (d *descriptor) StateTypeName() string { return "pkg/sentry/fs/host.descriptor" } -func (x *descriptor) StateFields() []string { +func (d *descriptor) StateFields() []string { return []string{ "origFD", "wouldBlock", } } -func (x *descriptor) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.origFD) - m.Save(1, &x.wouldBlock) +func (d *descriptor) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.origFD) + stateSinkObject.Save(1, &d.wouldBlock) } -func (x *descriptor) StateLoad(m state.Source) { - m.Load(0, &x.origFD) - m.Load(1, &x.wouldBlock) - m.AfterLoad(x.afterLoad) +func (d *descriptor) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.origFD) + stateSourceObject.Load(1, &d.wouldBlock) + stateSourceObject.AfterLoad(d.afterLoad) } -func (x *fileOperations) StateTypeName() string { +func (f *fileOperations) StateTypeName() string { return "pkg/sentry/fs/host.fileOperations" } -func (x *fileOperations) StateFields() []string { +func (f *fileOperations) StateFields() []string { return []string{ "iops", "dirCursor", } } -func (x *fileOperations) beforeSave() {} +func (f *fileOperations) beforeSave() {} -func (x *fileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) - m.Save(1, &x.dirCursor) +func (f *fileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.iops) + stateSinkObject.Save(1, &f.dirCursor) } -func (x *fileOperations) afterLoad() {} +func (f *fileOperations) afterLoad() {} -func (x *fileOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.iops) - m.Load(1, &x.dirCursor) +func (f *fileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &f.iops) + stateSourceObject.Load(1, &f.dirCursor) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/host.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *inodeOperations) StateTypeName() string { +func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/fs/host.inodeOperations" } -func (x *inodeOperations) StateFields() []string { +func (i *inodeOperations) StateFields() []string { return []string{ "fileState", "cachingInodeOps", } } -func (x *inodeOperations) beforeSave() {} +func (i *inodeOperations) beforeSave() {} -func (x *inodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileState) - m.Save(1, &x.cachingInodeOps) +func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fileState) + stateSinkObject.Save(1, &i.cachingInodeOps) } -func (x *inodeOperations) afterLoad() {} +func (i *inodeOperations) afterLoad() {} -func (x *inodeOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.fileState) - m.Load(1, &x.cachingInodeOps) +func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.fileState) + stateSourceObject.Load(1, &i.cachingInodeOps) } -func (x *inodeFileState) StateTypeName() string { +func (i *inodeFileState) StateTypeName() string { return "pkg/sentry/fs/host.inodeFileState" } -func (x *inodeFileState) StateFields() []string { +func (i *inodeFileState) StateFields() []string { return []string{ "descriptor", "sattr", @@ -112,30 +112,30 @@ func (x *inodeFileState) StateFields() []string { } } -func (x *inodeFileState) beforeSave() {} +func (i *inodeFileState) beforeSave() {} -func (x *inodeFileState) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.queue) { - state.Failf("queue is %#v, expected zero", &x.queue) +func (i *inodeFileState) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + if !state.IsZeroValue(&i.queue) { + state.Failf("queue is %#v, expected zero", &i.queue) } - m.Save(0, &x.descriptor) - m.Save(1, &x.sattr) - m.Save(2, &x.savedUAttr) + stateSinkObject.Save(0, &i.descriptor) + stateSinkObject.Save(1, &i.sattr) + stateSinkObject.Save(2, &i.savedUAttr) } -func (x *inodeFileState) StateLoad(m state.Source) { - m.LoadWait(0, &x.descriptor) - m.LoadWait(1, &x.sattr) - m.Load(2, &x.savedUAttr) - m.AfterLoad(x.afterLoad) +func (i *inodeFileState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.descriptor) + stateSourceObject.LoadWait(1, &i.sattr) + stateSourceObject.Load(2, &i.savedUAttr) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *ConnectedEndpoint) StateTypeName() string { +func (c *ConnectedEndpoint) StateTypeName() string { return "pkg/sentry/fs/host.ConnectedEndpoint" } -func (x *ConnectedEndpoint) StateFields() []string { +func (c *ConnectedEndpoint) StateFields() []string { return []string{ "ref", "queue", @@ -145,29 +145,29 @@ func (x *ConnectedEndpoint) StateFields() []string { } } -func (x *ConnectedEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ref) - m.Save(1, &x.queue) - m.Save(2, &x.path) - m.Save(3, &x.srfd) - m.Save(4, &x.stype) +func (c *ConnectedEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.ref) + stateSinkObject.Save(1, &c.queue) + stateSinkObject.Save(2, &c.path) + stateSinkObject.Save(3, &c.srfd) + stateSinkObject.Save(4, &c.stype) } -func (x *ConnectedEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.ref) - m.Load(1, &x.queue) - m.Load(2, &x.path) - m.LoadWait(3, &x.srfd) - m.Load(4, &x.stype) - m.AfterLoad(x.afterLoad) +func (c *ConnectedEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.ref) + stateSourceObject.Load(1, &c.queue) + stateSourceObject.Load(2, &c.path) + stateSourceObject.LoadWait(3, &c.srfd) + stateSourceObject.Load(4, &c.stype) + stateSourceObject.AfterLoad(c.afterLoad) } -func (x *TTYFileOperations) StateTypeName() string { +func (t *TTYFileOperations) StateTypeName() string { return "pkg/sentry/fs/host.TTYFileOperations" } -func (x *TTYFileOperations) StateFields() []string { +func (t *TTYFileOperations) StateFields() []string { return []string{ "fileOperations", "session", @@ -176,23 +176,23 @@ func (x *TTYFileOperations) StateFields() []string { } } -func (x *TTYFileOperations) beforeSave() {} +func (t *TTYFileOperations) beforeSave() {} -func (x *TTYFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileOperations) - m.Save(1, &x.session) - m.Save(2, &x.fgProcessGroup) - m.Save(3, &x.termios) +func (t *TTYFileOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.fileOperations) + stateSinkObject.Save(1, &t.session) + stateSinkObject.Save(2, &t.fgProcessGroup) + stateSinkObject.Save(3, &t.termios) } -func (x *TTYFileOperations) afterLoad() {} +func (t *TTYFileOperations) afterLoad() {} -func (x *TTYFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.fileOperations) - m.Load(1, &x.session) - m.Load(2, &x.fgProcessGroup) - m.Load(3, &x.termios) +func (t *TTYFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.fileOperations) + stateSourceObject.Load(1, &t.session) + stateSourceObject.Load(2, &t.fgProcessGroup) + stateSourceObject.Load(3, &t.termios) } func init() { diff --git a/pkg/sentry/fs/lock/lock_state_autogen.go b/pkg/sentry/fs/lock/lock_state_autogen.go index 8e2768c73..2b307be59 100644 --- a/pkg/sentry/fs/lock/lock_state_autogen.go +++ b/pkg/sentry/fs/lock/lock_state_autogen.go @@ -6,113 +6,113 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Lock) StateTypeName() string { +func (l *Lock) StateTypeName() string { return "pkg/sentry/fs/lock.Lock" } -func (x *Lock) StateFields() []string { +func (l *Lock) StateFields() []string { return []string{ "Readers", "Writer", } } -func (x *Lock) beforeSave() {} +func (l *Lock) beforeSave() {} -func (x *Lock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Readers) - m.Save(1, &x.Writer) +func (l *Lock) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Readers) + stateSinkObject.Save(1, &l.Writer) } -func (x *Lock) afterLoad() {} +func (l *Lock) afterLoad() {} -func (x *Lock) StateLoad(m state.Source) { - m.Load(0, &x.Readers) - m.Load(1, &x.Writer) +func (l *Lock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Readers) + stateSourceObject.Load(1, &l.Writer) } -func (x *Locks) StateTypeName() string { +func (l *Locks) StateTypeName() string { return "pkg/sentry/fs/lock.Locks" } -func (x *Locks) StateFields() []string { +func (l *Locks) StateFields() []string { return []string{ "locks", } } -func (x *Locks) beforeSave() {} +func (l *Locks) beforeSave() {} -func (x *Locks) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.blockedQueue) { - state.Failf("blockedQueue is %#v, expected zero", &x.blockedQueue) +func (l *Locks) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + if !state.IsZeroValue(&l.blockedQueue) { + state.Failf("blockedQueue is %#v, expected zero", &l.blockedQueue) } - m.Save(0, &x.locks) + stateSinkObject.Save(0, &l.locks) } -func (x *Locks) afterLoad() {} +func (l *Locks) afterLoad() {} -func (x *Locks) StateLoad(m state.Source) { - m.Load(0, &x.locks) +func (l *Locks) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.locks) } -func (x *LockRange) StateTypeName() string { +func (l *LockRange) StateTypeName() string { return "pkg/sentry/fs/lock.LockRange" } -func (x *LockRange) StateFields() []string { +func (l *LockRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *LockRange) beforeSave() {} +func (l *LockRange) beforeSave() {} -func (x *LockRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (l *LockRange) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Start) + stateSinkObject.Save(1, &l.End) } -func (x *LockRange) afterLoad() {} +func (l *LockRange) afterLoad() {} -func (x *LockRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (l *LockRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Start) + stateSourceObject.Load(1, &l.End) } -func (x *LockSet) StateTypeName() string { +func (l *LockSet) StateTypeName() string { return "pkg/sentry/fs/lock.LockSet" } -func (x *LockSet) StateFields() []string { +func (l *LockSet) StateFields() []string { return []string{ "root", } } -func (x *LockSet) beforeSave() {} +func (l *LockSet) beforeSave() {} -func (x *LockSet) StateSave(m state.Sink) { - x.beforeSave() - var root *LockSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (l *LockSet) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + var rootValue *LockSegmentDataSlices = l.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *LockSet) afterLoad() {} +func (l *LockSet) afterLoad() {} -func (x *LockSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*LockSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*LockSegmentDataSlices)) }) +func (l *LockSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*LockSegmentDataSlices), func(y interface{}) { l.loadRoot(y.(*LockSegmentDataSlices)) }) } -func (x *Locknode) StateTypeName() string { +func (l *Locknode) StateTypeName() string { return "pkg/sentry/fs/lock.Locknode" } -func (x *Locknode) StateFields() []string { +func (l *Locknode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -125,38 +125,38 @@ func (x *Locknode) StateFields() []string { } } -func (x *Locknode) beforeSave() {} +func (l *Locknode) beforeSave() {} -func (x *Locknode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (l *Locknode) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.nrSegments) + stateSinkObject.Save(1, &l.parent) + stateSinkObject.Save(2, &l.parentIndex) + stateSinkObject.Save(3, &l.hasChildren) + stateSinkObject.Save(4, &l.maxGap) + stateSinkObject.Save(5, &l.keys) + stateSinkObject.Save(6, &l.values) + stateSinkObject.Save(7, &l.children) } -func (x *Locknode) afterLoad() {} +func (l *Locknode) afterLoad() {} -func (x *Locknode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (l *Locknode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.nrSegments) + stateSourceObject.Load(1, &l.parent) + stateSourceObject.Load(2, &l.parentIndex) + stateSourceObject.Load(3, &l.hasChildren) + stateSourceObject.Load(4, &l.maxGap) + stateSourceObject.Load(5, &l.keys) + stateSourceObject.Load(6, &l.values) + stateSourceObject.Load(7, &l.children) } -func (x *LockSegmentDataSlices) StateTypeName() string { +func (l *LockSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/lock.LockSegmentDataSlices" } -func (x *LockSegmentDataSlices) StateFields() []string { +func (l *LockSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -164,21 +164,21 @@ func (x *LockSegmentDataSlices) StateFields() []string { } } -func (x *LockSegmentDataSlices) beforeSave() {} +func (l *LockSegmentDataSlices) beforeSave() {} -func (x *LockSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (l *LockSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Start) + stateSinkObject.Save(1, &l.End) + stateSinkObject.Save(2, &l.Values) } -func (x *LockSegmentDataSlices) afterLoad() {} +func (l *LockSegmentDataSlices) afterLoad() {} -func (x *LockSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (l *LockSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Start) + stateSourceObject.Load(1, &l.End) + stateSourceObject.Load(2, &l.Values) } func init() { diff --git a/pkg/sentry/fs/proc/proc_state_autogen.go b/pkg/sentry/fs/proc/proc_state_autogen.go index de5e7de5e..ddb1f4e6e 100644 --- a/pkg/sentry/fs/proc/proc_state_autogen.go +++ b/pkg/sentry/fs/proc/proc_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *execArgInode) StateTypeName() string { +func (e *execArgInode) StateTypeName() string { return "pkg/sentry/fs/proc.execArgInode" } -func (x *execArgInode) StateFields() []string { +func (e *execArgInode) StateFields() []string { return []string{ "SimpleFileInode", "arg", @@ -18,494 +18,494 @@ func (x *execArgInode) StateFields() []string { } } -func (x *execArgInode) beforeSave() {} +func (e *execArgInode) beforeSave() {} -func (x *execArgInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.arg) - m.Save(2, &x.t) +func (e *execArgInode) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.SimpleFileInode) + stateSinkObject.Save(1, &e.arg) + stateSinkObject.Save(2, &e.t) } -func (x *execArgInode) afterLoad() {} +func (e *execArgInode) afterLoad() {} -func (x *execArgInode) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.arg) - m.Load(2, &x.t) +func (e *execArgInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.SimpleFileInode) + stateSourceObject.Load(1, &e.arg) + stateSourceObject.Load(2, &e.t) } -func (x *execArgFile) StateTypeName() string { +func (e *execArgFile) StateTypeName() string { return "pkg/sentry/fs/proc.execArgFile" } -func (x *execArgFile) StateFields() []string { +func (e *execArgFile) StateFields() []string { return []string{ "arg", "t", } } -func (x *execArgFile) beforeSave() {} +func (e *execArgFile) beforeSave() {} -func (x *execArgFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.arg) - m.Save(1, &x.t) +func (e *execArgFile) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.arg) + stateSinkObject.Save(1, &e.t) } -func (x *execArgFile) afterLoad() {} +func (e *execArgFile) afterLoad() {} -func (x *execArgFile) StateLoad(m state.Source) { - m.Load(0, &x.arg) - m.Load(1, &x.t) +func (e *execArgFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.arg) + stateSourceObject.Load(1, &e.t) } -func (x *fdDir) StateTypeName() string { +func (f *fdDir) StateTypeName() string { return "pkg/sentry/fs/proc.fdDir" } -func (x *fdDir) StateFields() []string { +func (f *fdDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *fdDir) beforeSave() {} +func (f *fdDir) beforeSave() {} -func (x *fdDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (f *fdDir) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Dir) + stateSinkObject.Save(1, &f.t) } -func (x *fdDir) afterLoad() {} +func (f *fdDir) afterLoad() {} -func (x *fdDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (f *fdDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Dir) + stateSourceObject.Load(1, &f.t) } -func (x *fdDirFile) StateTypeName() string { +func (f *fdDirFile) StateTypeName() string { return "pkg/sentry/fs/proc.fdDirFile" } -func (x *fdDirFile) StateFields() []string { +func (f *fdDirFile) StateFields() []string { return []string{ "isInfoFile", "t", } } -func (x *fdDirFile) beforeSave() {} +func (f *fdDirFile) beforeSave() {} -func (x *fdDirFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.isInfoFile) - m.Save(1, &x.t) +func (f *fdDirFile) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.isInfoFile) + stateSinkObject.Save(1, &f.t) } -func (x *fdDirFile) afterLoad() {} +func (f *fdDirFile) afterLoad() {} -func (x *fdDirFile) StateLoad(m state.Source) { - m.Load(0, &x.isInfoFile) - m.Load(1, &x.t) +func (f *fdDirFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.isInfoFile) + stateSourceObject.Load(1, &f.t) } -func (x *fdInfoDir) StateTypeName() string { +func (f *fdInfoDir) StateTypeName() string { return "pkg/sentry/fs/proc.fdInfoDir" } -func (x *fdInfoDir) StateFields() []string { +func (f *fdInfoDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *fdInfoDir) beforeSave() {} +func (f *fdInfoDir) beforeSave() {} -func (x *fdInfoDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (f *fdInfoDir) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Dir) + stateSinkObject.Save(1, &f.t) } -func (x *fdInfoDir) afterLoad() {} +func (f *fdInfoDir) afterLoad() {} -func (x *fdInfoDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (f *fdInfoDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Dir) + stateSourceObject.Load(1, &f.t) } -func (x *filesystemsData) StateTypeName() string { +func (f *filesystemsData) StateTypeName() string { return "pkg/sentry/fs/proc.filesystemsData" } -func (x *filesystemsData) StateFields() []string { +func (f *filesystemsData) StateFields() []string { return []string{} } -func (x *filesystemsData) beforeSave() {} +func (f *filesystemsData) beforeSave() {} -func (x *filesystemsData) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystemsData) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystemsData) afterLoad() {} +func (f *filesystemsData) afterLoad() {} -func (x *filesystemsData) StateLoad(m state.Source) { +func (f *filesystemsData) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/proc.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *taskOwnedInodeOps) StateTypeName() string { +func (t *taskOwnedInodeOps) StateTypeName() string { return "pkg/sentry/fs/proc.taskOwnedInodeOps" } -func (x *taskOwnedInodeOps) StateFields() []string { +func (t *taskOwnedInodeOps) StateFields() []string { return []string{ "InodeOperations", "t", } } -func (x *taskOwnedInodeOps) beforeSave() {} +func (t *taskOwnedInodeOps) beforeSave() {} -func (x *taskOwnedInodeOps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) - m.Save(1, &x.t) +func (t *taskOwnedInodeOps) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.InodeOperations) + stateSinkObject.Save(1, &t.t) } -func (x *taskOwnedInodeOps) afterLoad() {} +func (t *taskOwnedInodeOps) afterLoad() {} -func (x *taskOwnedInodeOps) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) - m.Load(1, &x.t) +func (t *taskOwnedInodeOps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.InodeOperations) + stateSourceObject.Load(1, &t.t) } -func (x *staticFileInodeOps) StateTypeName() string { +func (s *staticFileInodeOps) StateTypeName() string { return "pkg/sentry/fs/proc.staticFileInodeOps" } -func (x *staticFileInodeOps) StateFields() []string { +func (s *staticFileInodeOps) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeStaticFileGetter", } } -func (x *staticFileInodeOps) beforeSave() {} +func (s *staticFileInodeOps) beforeSave() {} -func (x *staticFileInodeOps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeStaticFileGetter) +func (s *staticFileInodeOps) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeStaticFileGetter) } -func (x *staticFileInodeOps) afterLoad() {} +func (s *staticFileInodeOps) afterLoad() {} -func (x *staticFileInodeOps) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeStaticFileGetter) +func (s *staticFileInodeOps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeStaticFileGetter) } -func (x *loadavgData) StateTypeName() string { +func (l *loadavgData) StateTypeName() string { return "pkg/sentry/fs/proc.loadavgData" } -func (x *loadavgData) StateFields() []string { +func (l *loadavgData) StateFields() []string { return []string{} } -func (x *loadavgData) beforeSave() {} +func (l *loadavgData) beforeSave() {} -func (x *loadavgData) StateSave(m state.Sink) { - x.beforeSave() +func (l *loadavgData) StateSave(stateSinkObject state.Sink) { + l.beforeSave() } -func (x *loadavgData) afterLoad() {} +func (l *loadavgData) afterLoad() {} -func (x *loadavgData) StateLoad(m state.Source) { +func (l *loadavgData) StateLoad(stateSourceObject state.Source) { } -func (x *meminfoData) StateTypeName() string { +func (m *meminfoData) StateTypeName() string { return "pkg/sentry/fs/proc.meminfoData" } -func (x *meminfoData) StateFields() []string { +func (m *meminfoData) StateFields() []string { return []string{ "k", } } -func (x *meminfoData) beforeSave() {} +func (m *meminfoData) beforeSave() {} -func (x *meminfoData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (m *meminfoData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.k) } -func (x *meminfoData) afterLoad() {} +func (m *meminfoData) afterLoad() {} -func (x *meminfoData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (m *meminfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.k) } -func (x *mountInfoFile) StateTypeName() string { +func (m *mountInfoFile) StateTypeName() string { return "pkg/sentry/fs/proc.mountInfoFile" } -func (x *mountInfoFile) StateFields() []string { +func (m *mountInfoFile) StateFields() []string { return []string{ "t", } } -func (x *mountInfoFile) beforeSave() {} +func (m *mountInfoFile) beforeSave() {} -func (x *mountInfoFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mountInfoFile) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mountInfoFile) afterLoad() {} +func (m *mountInfoFile) afterLoad() {} -func (x *mountInfoFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mountInfoFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *mountsFile) StateTypeName() string { +func (m *mountsFile) StateTypeName() string { return "pkg/sentry/fs/proc.mountsFile" } -func (x *mountsFile) StateFields() []string { +func (m *mountsFile) StateFields() []string { return []string{ "t", } } -func (x *mountsFile) beforeSave() {} +func (m *mountsFile) beforeSave() {} -func (x *mountsFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mountsFile) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mountsFile) afterLoad() {} +func (m *mountsFile) afterLoad() {} -func (x *mountsFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mountsFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *ifinet6) StateTypeName() string { +func (i *ifinet6) StateTypeName() string { return "pkg/sentry/fs/proc.ifinet6" } -func (x *ifinet6) StateFields() []string { +func (i *ifinet6) StateFields() []string { return []string{ "s", } } -func (x *ifinet6) beforeSave() {} +func (i *ifinet6) beforeSave() {} -func (x *ifinet6) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (i *ifinet6) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.s) } -func (x *ifinet6) afterLoad() {} +func (i *ifinet6) afterLoad() {} -func (x *ifinet6) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (i *ifinet6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.s) } -func (x *netDev) StateTypeName() string { +func (n *netDev) StateTypeName() string { return "pkg/sentry/fs/proc.netDev" } -func (x *netDev) StateFields() []string { +func (n *netDev) StateFields() []string { return []string{ "s", } } -func (x *netDev) beforeSave() {} +func (n *netDev) beforeSave() {} -func (x *netDev) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netDev) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netDev) afterLoad() {} +func (n *netDev) afterLoad() {} -func (x *netDev) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netDev) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netSnmp) StateTypeName() string { +func (n *netSnmp) StateTypeName() string { return "pkg/sentry/fs/proc.netSnmp" } -func (x *netSnmp) StateFields() []string { +func (n *netSnmp) StateFields() []string { return []string{ "s", } } -func (x *netSnmp) beforeSave() {} +func (n *netSnmp) beforeSave() {} -func (x *netSnmp) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netSnmp) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netSnmp) afterLoad() {} +func (n *netSnmp) afterLoad() {} -func (x *netSnmp) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netSnmp) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netRoute) StateTypeName() string { +func (n *netRoute) StateTypeName() string { return "pkg/sentry/fs/proc.netRoute" } -func (x *netRoute) StateFields() []string { +func (n *netRoute) StateFields() []string { return []string{ "s", } } -func (x *netRoute) beforeSave() {} +func (n *netRoute) beforeSave() {} -func (x *netRoute) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netRoute) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netRoute) afterLoad() {} +func (n *netRoute) afterLoad() {} -func (x *netRoute) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netRoute) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netUnix) StateTypeName() string { +func (n *netUnix) StateTypeName() string { return "pkg/sentry/fs/proc.netUnix" } -func (x *netUnix) StateFields() []string { +func (n *netUnix) StateFields() []string { return []string{ "k", } } -func (x *netUnix) beforeSave() {} +func (n *netUnix) beforeSave() {} -func (x *netUnix) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netUnix) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netUnix) afterLoad() {} +func (n *netUnix) afterLoad() {} -func (x *netUnix) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netUnix) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netTCP) StateTypeName() string { +func (n *netTCP) StateTypeName() string { return "pkg/sentry/fs/proc.netTCP" } -func (x *netTCP) StateFields() []string { +func (n *netTCP) StateFields() []string { return []string{ "k", } } -func (x *netTCP) beforeSave() {} +func (n *netTCP) beforeSave() {} -func (x *netTCP) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netTCP) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netTCP) afterLoad() {} +func (n *netTCP) afterLoad() {} -func (x *netTCP) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netTCP) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netTCP6) StateTypeName() string { +func (n *netTCP6) StateTypeName() string { return "pkg/sentry/fs/proc.netTCP6" } -func (x *netTCP6) StateFields() []string { +func (n *netTCP6) StateFields() []string { return []string{ "k", } } -func (x *netTCP6) beforeSave() {} +func (n *netTCP6) beforeSave() {} -func (x *netTCP6) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netTCP6) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netTCP6) afterLoad() {} +func (n *netTCP6) afterLoad() {} -func (x *netTCP6) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netTCP6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netUDP) StateTypeName() string { +func (n *netUDP) StateTypeName() string { return "pkg/sentry/fs/proc.netUDP" } -func (x *netUDP) StateFields() []string { +func (n *netUDP) StateFields() []string { return []string{ "k", } } -func (x *netUDP) beforeSave() {} +func (n *netUDP) beforeSave() {} -func (x *netUDP) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netUDP) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netUDP) afterLoad() {} +func (n *netUDP) afterLoad() {} -func (x *netUDP) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netUDP) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *proc) StateTypeName() string { +func (p *proc) StateTypeName() string { return "pkg/sentry/fs/proc.proc" } -func (x *proc) StateFields() []string { +func (p *proc) StateFields() []string { return []string{ "Dir", "k", @@ -514,212 +514,212 @@ func (x *proc) StateFields() []string { } } -func (x *proc) beforeSave() {} +func (p *proc) beforeSave() {} -func (x *proc) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.k) - m.Save(2, &x.pidns) - m.Save(3, &x.cgroupControllers) +func (p *proc) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Dir) + stateSinkObject.Save(1, &p.k) + stateSinkObject.Save(2, &p.pidns) + stateSinkObject.Save(3, &p.cgroupControllers) } -func (x *proc) afterLoad() {} +func (p *proc) afterLoad() {} -func (x *proc) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.k) - m.Load(2, &x.pidns) - m.Load(3, &x.cgroupControllers) +func (p *proc) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Dir) + stateSourceObject.Load(1, &p.k) + stateSourceObject.Load(2, &p.pidns) + stateSourceObject.Load(3, &p.cgroupControllers) } -func (x *self) StateTypeName() string { +func (s *self) StateTypeName() string { return "pkg/sentry/fs/proc.self" } -func (x *self) StateFields() []string { +func (s *self) StateFields() []string { return []string{ "Symlink", "pidns", } } -func (x *self) beforeSave() {} +func (s *self) beforeSave() {} -func (x *self) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.pidns) +func (s *self) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Symlink) + stateSinkObject.Save(1, &s.pidns) } -func (x *self) afterLoad() {} +func (s *self) afterLoad() {} -func (x *self) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.pidns) +func (s *self) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Symlink) + stateSourceObject.Load(1, &s.pidns) } -func (x *threadSelf) StateTypeName() string { +func (t *threadSelf) StateTypeName() string { return "pkg/sentry/fs/proc.threadSelf" } -func (x *threadSelf) StateFields() []string { +func (t *threadSelf) StateFields() []string { return []string{ "Symlink", "pidns", } } -func (x *threadSelf) beforeSave() {} +func (t *threadSelf) beforeSave() {} -func (x *threadSelf) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.pidns) +func (t *threadSelf) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Symlink) + stateSinkObject.Save(1, &t.pidns) } -func (x *threadSelf) afterLoad() {} +func (t *threadSelf) afterLoad() {} -func (x *threadSelf) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.pidns) +func (t *threadSelf) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Symlink) + stateSourceObject.Load(1, &t.pidns) } -func (x *rootProcFile) StateTypeName() string { +func (r *rootProcFile) StateTypeName() string { return "pkg/sentry/fs/proc.rootProcFile" } -func (x *rootProcFile) StateFields() []string { +func (r *rootProcFile) StateFields() []string { return []string{ "iops", } } -func (x *rootProcFile) beforeSave() {} +func (r *rootProcFile) beforeSave() {} -func (x *rootProcFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (r *rootProcFile) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.iops) } -func (x *rootProcFile) afterLoad() {} +func (r *rootProcFile) afterLoad() {} -func (x *rootProcFile) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (r *rootProcFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.iops) } -func (x *statData) StateTypeName() string { +func (s *statData) StateTypeName() string { return "pkg/sentry/fs/proc.statData" } -func (x *statData) StateFields() []string { +func (s *statData) StateFields() []string { return []string{ "k", } } -func (x *statData) beforeSave() {} +func (s *statData) beforeSave() {} -func (x *statData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (s *statData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.k) } -func (x *statData) afterLoad() {} +func (s *statData) afterLoad() {} -func (x *statData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (s *statData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.k) } -func (x *mmapMinAddrData) StateTypeName() string { +func (m *mmapMinAddrData) StateTypeName() string { return "pkg/sentry/fs/proc.mmapMinAddrData" } -func (x *mmapMinAddrData) StateFields() []string { +func (m *mmapMinAddrData) StateFields() []string { return []string{ "k", } } -func (x *mmapMinAddrData) beforeSave() {} +func (m *mmapMinAddrData) beforeSave() {} -func (x *mmapMinAddrData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (m *mmapMinAddrData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.k) } -func (x *mmapMinAddrData) afterLoad() {} +func (m *mmapMinAddrData) afterLoad() {} -func (x *mmapMinAddrData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (m *mmapMinAddrData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.k) } -func (x *overcommitMemory) StateTypeName() string { +func (o *overcommitMemory) StateTypeName() string { return "pkg/sentry/fs/proc.overcommitMemory" } -func (x *overcommitMemory) StateFields() []string { +func (o *overcommitMemory) StateFields() []string { return []string{} } -func (x *overcommitMemory) beforeSave() {} +func (o *overcommitMemory) beforeSave() {} -func (x *overcommitMemory) StateSave(m state.Sink) { - x.beforeSave() +func (o *overcommitMemory) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *overcommitMemory) afterLoad() {} +func (o *overcommitMemory) afterLoad() {} -func (x *overcommitMemory) StateLoad(m state.Source) { +func (o *overcommitMemory) StateLoad(stateSourceObject state.Source) { } -func (x *hostname) StateTypeName() string { +func (h *hostname) StateTypeName() string { return "pkg/sentry/fs/proc.hostname" } -func (x *hostname) StateFields() []string { +func (h *hostname) StateFields() []string { return []string{ "SimpleFileInode", } } -func (x *hostname) beforeSave() {} +func (h *hostname) beforeSave() {} -func (x *hostname) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) +func (h *hostname) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.SimpleFileInode) } -func (x *hostname) afterLoad() {} +func (h *hostname) afterLoad() {} -func (x *hostname) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) +func (h *hostname) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.SimpleFileInode) } -func (x *hostnameFile) StateTypeName() string { +func (h *hostnameFile) StateTypeName() string { return "pkg/sentry/fs/proc.hostnameFile" } -func (x *hostnameFile) StateFields() []string { +func (h *hostnameFile) StateFields() []string { return []string{} } -func (x *hostnameFile) beforeSave() {} +func (h *hostnameFile) beforeSave() {} -func (x *hostnameFile) StateSave(m state.Sink) { - x.beforeSave() +func (h *hostnameFile) StateSave(stateSinkObject state.Sink) { + h.beforeSave() } -func (x *hostnameFile) afterLoad() {} +func (h *hostnameFile) afterLoad() {} -func (x *hostnameFile) StateLoad(m state.Source) { +func (h *hostnameFile) StateLoad(stateSourceObject state.Source) { } -func (x *tcpMemInode) StateTypeName() string { +func (t *tcpMemInode) StateTypeName() string { return "pkg/sentry/fs/proc.tcpMemInode" } -func (x *tcpMemInode) StateFields() []string { +func (t *tcpMemInode) StateFields() []string { return []string{ "SimpleFileInode", "dir", @@ -728,50 +728,50 @@ func (x *tcpMemInode) StateFields() []string { } } -func (x *tcpMemInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.dir) - m.Save(2, &x.s) - m.Save(3, &x.size) +func (t *tcpMemInode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.dir) + stateSinkObject.Save(2, &t.s) + stateSinkObject.Save(3, &t.size) } -func (x *tcpMemInode) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.dir) - m.LoadWait(2, &x.s) - m.Load(3, &x.size) - m.AfterLoad(x.afterLoad) +func (t *tcpMemInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.Load(1, &t.dir) + stateSourceObject.LoadWait(2, &t.s) + stateSourceObject.Load(3, &t.size) + stateSourceObject.AfterLoad(t.afterLoad) } -func (x *tcpMemFile) StateTypeName() string { +func (t *tcpMemFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpMemFile" } -func (x *tcpMemFile) StateFields() []string { +func (t *tcpMemFile) StateFields() []string { return []string{ "tcpMemInode", } } -func (x *tcpMemFile) beforeSave() {} +func (t *tcpMemFile) beforeSave() {} -func (x *tcpMemFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpMemInode) +func (t *tcpMemFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpMemInode) } -func (x *tcpMemFile) afterLoad() {} +func (t *tcpMemFile) afterLoad() {} -func (x *tcpMemFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpMemInode) +func (t *tcpMemFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpMemInode) } -func (x *tcpSack) StateTypeName() string { +func (t *tcpSack) StateTypeName() string { return "pkg/sentry/fs/proc.tcpSack" } -func (x *tcpSack) StateFields() []string { +func (t *tcpSack) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -779,53 +779,53 @@ func (x *tcpSack) StateFields() []string { } } -func (x *tcpSack) beforeSave() {} +func (t *tcpSack) beforeSave() {} -func (x *tcpSack) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (t *tcpSack) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.stack) + stateSinkObject.Save(2, &t.enabled) } -func (x *tcpSack) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) - m.AfterLoad(x.afterLoad) +func (t *tcpSack) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.LoadWait(1, &t.stack) + stateSourceObject.Load(2, &t.enabled) + stateSourceObject.AfterLoad(t.afterLoad) } -func (x *tcpSackFile) StateTypeName() string { +func (t *tcpSackFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpSackFile" } -func (x *tcpSackFile) StateFields() []string { +func (t *tcpSackFile) StateFields() []string { return []string{ "tcpSack", "stack", } } -func (x *tcpSackFile) beforeSave() {} +func (t *tcpSackFile) beforeSave() {} -func (x *tcpSackFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpSack) - m.Save(1, &x.stack) +func (t *tcpSackFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpSack) + stateSinkObject.Save(1, &t.stack) } -func (x *tcpSackFile) afterLoad() {} +func (t *tcpSackFile) afterLoad() {} -func (x *tcpSackFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpSack) - m.LoadWait(1, &x.stack) +func (t *tcpSackFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpSack) + stateSourceObject.LoadWait(1, &t.stack) } -func (x *tcpRecovery) StateTypeName() string { +func (t *tcpRecovery) StateTypeName() string { return "pkg/sentry/fs/proc.tcpRecovery" } -func (x *tcpRecovery) StateFields() []string { +func (t *tcpRecovery) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -833,54 +833,54 @@ func (x *tcpRecovery) StateFields() []string { } } -func (x *tcpRecovery) beforeSave() {} +func (t *tcpRecovery) beforeSave() {} -func (x *tcpRecovery) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.recovery) +func (t *tcpRecovery) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.stack) + stateSinkObject.Save(2, &t.recovery) } -func (x *tcpRecovery) afterLoad() {} +func (t *tcpRecovery) afterLoad() {} -func (x *tcpRecovery) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.recovery) +func (t *tcpRecovery) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.LoadWait(1, &t.stack) + stateSourceObject.Load(2, &t.recovery) } -func (x *tcpRecoveryFile) StateTypeName() string { +func (t *tcpRecoveryFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpRecoveryFile" } -func (x *tcpRecoveryFile) StateFields() []string { +func (t *tcpRecoveryFile) StateFields() []string { return []string{ "tcpRecovery", "stack", } } -func (x *tcpRecoveryFile) beforeSave() {} +func (t *tcpRecoveryFile) beforeSave() {} -func (x *tcpRecoveryFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpRecovery) - m.Save(1, &x.stack) +func (t *tcpRecoveryFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpRecovery) + stateSinkObject.Save(1, &t.stack) } -func (x *tcpRecoveryFile) afterLoad() {} +func (t *tcpRecoveryFile) afterLoad() {} -func (x *tcpRecoveryFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpRecovery) - m.LoadWait(1, &x.stack) +func (t *tcpRecoveryFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpRecovery) + stateSourceObject.LoadWait(1, &t.stack) } -func (x *ipForwarding) StateTypeName() string { +func (i *ipForwarding) StateTypeName() string { return "pkg/sentry/fs/proc.ipForwarding" } -func (x *ipForwarding) StateFields() []string { +func (i *ipForwarding) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -888,79 +888,79 @@ func (x *ipForwarding) StateFields() []string { } } -func (x *ipForwarding) beforeSave() {} +func (i *ipForwarding) beforeSave() {} -func (x *ipForwarding) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (i *ipForwarding) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.SimpleFileInode) + stateSinkObject.Save(1, &i.stack) + stateSinkObject.Save(2, &i.enabled) } -func (x *ipForwarding) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) - m.AfterLoad(x.afterLoad) +func (i *ipForwarding) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.SimpleFileInode) + stateSourceObject.LoadWait(1, &i.stack) + stateSourceObject.Load(2, &i.enabled) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *ipForwardingFile) StateTypeName() string { +func (i *ipForwardingFile) StateTypeName() string { return "pkg/sentry/fs/proc.ipForwardingFile" } -func (x *ipForwardingFile) StateFields() []string { +func (i *ipForwardingFile) StateFields() []string { return []string{ "ipf", "stack", } } -func (x *ipForwardingFile) beforeSave() {} +func (i *ipForwardingFile) beforeSave() {} -func (x *ipForwardingFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ipf) - m.Save(1, &x.stack) +func (i *ipForwardingFile) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.ipf) + stateSinkObject.Save(1, &i.stack) } -func (x *ipForwardingFile) afterLoad() {} +func (i *ipForwardingFile) afterLoad() {} -func (x *ipForwardingFile) StateLoad(m state.Source) { - m.Load(0, &x.ipf) - m.LoadWait(1, &x.stack) +func (i *ipForwardingFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.ipf) + stateSourceObject.LoadWait(1, &i.stack) } -func (x *taskDir) StateTypeName() string { +func (t *taskDir) StateTypeName() string { return "pkg/sentry/fs/proc.taskDir" } -func (x *taskDir) StateFields() []string { +func (t *taskDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *taskDir) beforeSave() {} +func (t *taskDir) beforeSave() {} -func (x *taskDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (t *taskDir) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Dir) + stateSinkObject.Save(1, &t.t) } -func (x *taskDir) afterLoad() {} +func (t *taskDir) afterLoad() {} -func (x *taskDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (t *taskDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Dir) + stateSourceObject.Load(1, &t.t) } -func (x *subtasks) StateTypeName() string { +func (s *subtasks) StateTypeName() string { return "pkg/sentry/fs/proc.subtasks" } -func (x *subtasks) StateFields() []string { +func (s *subtasks) StateFields() []string { return []string{ "Dir", "t", @@ -968,178 +968,178 @@ func (x *subtasks) StateFields() []string { } } -func (x *subtasks) beforeSave() {} +func (s *subtasks) beforeSave() {} -func (x *subtasks) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) - m.Save(2, &x.p) +func (s *subtasks) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Dir) + stateSinkObject.Save(1, &s.t) + stateSinkObject.Save(2, &s.p) } -func (x *subtasks) afterLoad() {} +func (s *subtasks) afterLoad() {} -func (x *subtasks) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) - m.Load(2, &x.p) +func (s *subtasks) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Dir) + stateSourceObject.Load(1, &s.t) + stateSourceObject.Load(2, &s.p) } -func (x *subtasksFile) StateTypeName() string { +func (s *subtasksFile) StateTypeName() string { return "pkg/sentry/fs/proc.subtasksFile" } -func (x *subtasksFile) StateFields() []string { +func (s *subtasksFile) StateFields() []string { return []string{ "t", "pidns", } } -func (x *subtasksFile) beforeSave() {} +func (s *subtasksFile) beforeSave() {} -func (x *subtasksFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.pidns) +func (s *subtasksFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) + stateSinkObject.Save(1, &s.pidns) } -func (x *subtasksFile) afterLoad() {} +func (s *subtasksFile) afterLoad() {} -func (x *subtasksFile) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.pidns) +func (s *subtasksFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) + stateSourceObject.Load(1, &s.pidns) } -func (x *exe) StateTypeName() string { +func (e *exe) StateTypeName() string { return "pkg/sentry/fs/proc.exe" } -func (x *exe) StateFields() []string { +func (e *exe) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *exe) beforeSave() {} +func (e *exe) beforeSave() {} -func (x *exe) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (e *exe) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Symlink) + stateSinkObject.Save(1, &e.t) } -func (x *exe) afterLoad() {} +func (e *exe) afterLoad() {} -func (x *exe) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (e *exe) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Symlink) + stateSourceObject.Load(1, &e.t) } -func (x *cwd) StateTypeName() string { +func (c *cwd) StateTypeName() string { return "pkg/sentry/fs/proc.cwd" } -func (x *cwd) StateFields() []string { +func (c *cwd) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *cwd) beforeSave() {} +func (c *cwd) beforeSave() {} -func (x *cwd) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (c *cwd) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.Symlink) + stateSinkObject.Save(1, &c.t) } -func (x *cwd) afterLoad() {} +func (c *cwd) afterLoad() {} -func (x *cwd) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (c *cwd) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.Symlink) + stateSourceObject.Load(1, &c.t) } -func (x *namespaceSymlink) StateTypeName() string { +func (n *namespaceSymlink) StateTypeName() string { return "pkg/sentry/fs/proc.namespaceSymlink" } -func (x *namespaceSymlink) StateFields() []string { +func (n *namespaceSymlink) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *namespaceSymlink) beforeSave() {} +func (n *namespaceSymlink) beforeSave() {} -func (x *namespaceSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (n *namespaceSymlink) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.Symlink) + stateSinkObject.Save(1, &n.t) } -func (x *namespaceSymlink) afterLoad() {} +func (n *namespaceSymlink) afterLoad() {} -func (x *namespaceSymlink) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (n *namespaceSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.Symlink) + stateSourceObject.Load(1, &n.t) } -func (x *mapsData) StateTypeName() string { +func (m *mapsData) StateTypeName() string { return "pkg/sentry/fs/proc.mapsData" } -func (x *mapsData) StateFields() []string { +func (m *mapsData) StateFields() []string { return []string{ "t", } } -func (x *mapsData) beforeSave() {} +func (m *mapsData) beforeSave() {} -func (x *mapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mapsData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mapsData) afterLoad() {} +func (m *mapsData) afterLoad() {} -func (x *mapsData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *smapsData) StateTypeName() string { +func (s *smapsData) StateTypeName() string { return "pkg/sentry/fs/proc.smapsData" } -func (x *smapsData) StateFields() []string { +func (s *smapsData) StateFields() []string { return []string{ "t", } } -func (x *smapsData) beforeSave() {} +func (s *smapsData) beforeSave() {} -func (x *smapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (s *smapsData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) } -func (x *smapsData) afterLoad() {} +func (s *smapsData) afterLoad() {} -func (x *smapsData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (s *smapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) } -func (x *taskStatData) StateTypeName() string { +func (t *taskStatData) StateTypeName() string { return "pkg/sentry/fs/proc.taskStatData" } -func (x *taskStatData) StateFields() []string { +func (t *taskStatData) StateFields() []string { return []string{ "t", "tgstats", @@ -1147,247 +1147,247 @@ func (x *taskStatData) StateFields() []string { } } -func (x *taskStatData) beforeSave() {} +func (t *taskStatData) beforeSave() {} -func (x *taskStatData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.tgstats) - m.Save(2, &x.pidns) +func (t *taskStatData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.t) + stateSinkObject.Save(1, &t.tgstats) + stateSinkObject.Save(2, &t.pidns) } -func (x *taskStatData) afterLoad() {} +func (t *taskStatData) afterLoad() {} -func (x *taskStatData) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.tgstats) - m.Load(2, &x.pidns) +func (t *taskStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.t) + stateSourceObject.Load(1, &t.tgstats) + stateSourceObject.Load(2, &t.pidns) } -func (x *statmData) StateTypeName() string { +func (s *statmData) StateTypeName() string { return "pkg/sentry/fs/proc.statmData" } -func (x *statmData) StateFields() []string { +func (s *statmData) StateFields() []string { return []string{ "t", } } -func (x *statmData) beforeSave() {} +func (s *statmData) beforeSave() {} -func (x *statmData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (s *statmData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) } -func (x *statmData) afterLoad() {} +func (s *statmData) afterLoad() {} -func (x *statmData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (s *statmData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) } -func (x *statusData) StateTypeName() string { +func (s *statusData) StateTypeName() string { return "pkg/sentry/fs/proc.statusData" } -func (x *statusData) StateFields() []string { +func (s *statusData) StateFields() []string { return []string{ "t", "pidns", } } -func (x *statusData) beforeSave() {} +func (s *statusData) beforeSave() {} -func (x *statusData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.pidns) +func (s *statusData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) + stateSinkObject.Save(1, &s.pidns) } -func (x *statusData) afterLoad() {} +func (s *statusData) afterLoad() {} -func (x *statusData) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.pidns) +func (s *statusData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) + stateSourceObject.Load(1, &s.pidns) } -func (x *ioData) StateTypeName() string { +func (i *ioData) StateTypeName() string { return "pkg/sentry/fs/proc.ioData" } -func (x *ioData) StateFields() []string { +func (i *ioData) StateFields() []string { return []string{ "ioUsage", } } -func (x *ioData) beforeSave() {} +func (i *ioData) beforeSave() {} -func (x *ioData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ioUsage) +func (i *ioData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.ioUsage) } -func (x *ioData) afterLoad() {} +func (i *ioData) afterLoad() {} -func (x *ioData) StateLoad(m state.Source) { - m.Load(0, &x.ioUsage) +func (i *ioData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.ioUsage) } -func (x *comm) StateTypeName() string { +func (c *comm) StateTypeName() string { return "pkg/sentry/fs/proc.comm" } -func (x *comm) StateFields() []string { +func (c *comm) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *comm) beforeSave() {} +func (c *comm) beforeSave() {} -func (x *comm) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (c *comm) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.SimpleFileInode) + stateSinkObject.Save(1, &c.t) } -func (x *comm) afterLoad() {} +func (c *comm) afterLoad() {} -func (x *comm) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (c *comm) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.SimpleFileInode) + stateSourceObject.Load(1, &c.t) } -func (x *commFile) StateTypeName() string { +func (c *commFile) StateTypeName() string { return "pkg/sentry/fs/proc.commFile" } -func (x *commFile) StateFields() []string { +func (c *commFile) StateFields() []string { return []string{ "t", } } -func (x *commFile) beforeSave() {} +func (c *commFile) beforeSave() {} -func (x *commFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (c *commFile) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.t) } -func (x *commFile) afterLoad() {} +func (c *commFile) afterLoad() {} -func (x *commFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (c *commFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.t) } -func (x *auxvec) StateTypeName() string { +func (a *auxvec) StateTypeName() string { return "pkg/sentry/fs/proc.auxvec" } -func (x *auxvec) StateFields() []string { +func (a *auxvec) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *auxvec) beforeSave() {} +func (a *auxvec) beforeSave() {} -func (x *auxvec) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (a *auxvec) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.SimpleFileInode) + stateSinkObject.Save(1, &a.t) } -func (x *auxvec) afterLoad() {} +func (a *auxvec) afterLoad() {} -func (x *auxvec) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (a *auxvec) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.SimpleFileInode) + stateSourceObject.Load(1, &a.t) } -func (x *auxvecFile) StateTypeName() string { +func (a *auxvecFile) StateTypeName() string { return "pkg/sentry/fs/proc.auxvecFile" } -func (x *auxvecFile) StateFields() []string { +func (a *auxvecFile) StateFields() []string { return []string{ "t", } } -func (x *auxvecFile) beforeSave() {} +func (a *auxvecFile) beforeSave() {} -func (x *auxvecFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (a *auxvecFile) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.t) } -func (x *auxvecFile) afterLoad() {} +func (a *auxvecFile) afterLoad() {} -func (x *auxvecFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (a *auxvecFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.t) } -func (x *oomScoreAdj) StateTypeName() string { +func (o *oomScoreAdj) StateTypeName() string { return "pkg/sentry/fs/proc.oomScoreAdj" } -func (x *oomScoreAdj) StateFields() []string { +func (o *oomScoreAdj) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *oomScoreAdj) beforeSave() {} +func (o *oomScoreAdj) beforeSave() {} -func (x *oomScoreAdj) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (o *oomScoreAdj) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.SimpleFileInode) + stateSinkObject.Save(1, &o.t) } -func (x *oomScoreAdj) afterLoad() {} +func (o *oomScoreAdj) afterLoad() {} -func (x *oomScoreAdj) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (o *oomScoreAdj) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.SimpleFileInode) + stateSourceObject.Load(1, &o.t) } -func (x *oomScoreAdjFile) StateTypeName() string { +func (o *oomScoreAdjFile) StateTypeName() string { return "pkg/sentry/fs/proc.oomScoreAdjFile" } -func (x *oomScoreAdjFile) StateFields() []string { +func (o *oomScoreAdjFile) StateFields() []string { return []string{ "t", } } -func (x *oomScoreAdjFile) beforeSave() {} +func (o *oomScoreAdjFile) beforeSave() {} -func (x *oomScoreAdjFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (o *oomScoreAdjFile) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.t) } -func (x *oomScoreAdjFile) afterLoad() {} +func (o *oomScoreAdjFile) afterLoad() {} -func (x *oomScoreAdjFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (o *oomScoreAdjFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.t) } -func (x *idMapInodeOperations) StateTypeName() string { +func (i *idMapInodeOperations) StateTypeName() string { return "pkg/sentry/fs/proc.idMapInodeOperations" } -func (x *idMapInodeOperations) StateFields() []string { +func (i *idMapInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -1396,118 +1396,118 @@ func (x *idMapInodeOperations) StateFields() []string { } } -func (x *idMapInodeOperations) beforeSave() {} +func (i *idMapInodeOperations) beforeSave() {} -func (x *idMapInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.t) - m.Save(3, &x.gids) +func (i *idMapInodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeSimpleAttributes) + stateSinkObject.Save(1, &i.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &i.t) + stateSinkObject.Save(3, &i.gids) } -func (x *idMapInodeOperations) afterLoad() {} +func (i *idMapInodeOperations) afterLoad() {} -func (x *idMapInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.t) - m.Load(3, &x.gids) +func (i *idMapInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeSimpleAttributes) + stateSourceObject.Load(1, &i.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &i.t) + stateSourceObject.Load(3, &i.gids) } -func (x *idMapFileOperations) StateTypeName() string { +func (i *idMapFileOperations) StateTypeName() string { return "pkg/sentry/fs/proc.idMapFileOperations" } -func (x *idMapFileOperations) StateFields() []string { +func (i *idMapFileOperations) StateFields() []string { return []string{ "iops", } } -func (x *idMapFileOperations) beforeSave() {} +func (i *idMapFileOperations) beforeSave() {} -func (x *idMapFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (i *idMapFileOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.iops) } -func (x *idMapFileOperations) afterLoad() {} +func (i *idMapFileOperations) afterLoad() {} -func (x *idMapFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (i *idMapFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.iops) } -func (x *uptime) StateTypeName() string { +func (u *uptime) StateTypeName() string { return "pkg/sentry/fs/proc.uptime" } -func (x *uptime) StateFields() []string { +func (u *uptime) StateFields() []string { return []string{ "SimpleFileInode", "startTime", } } -func (x *uptime) beforeSave() {} +func (u *uptime) beforeSave() {} -func (x *uptime) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.startTime) +func (u *uptime) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.SimpleFileInode) + stateSinkObject.Save(1, &u.startTime) } -func (x *uptime) afterLoad() {} +func (u *uptime) afterLoad() {} -func (x *uptime) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.startTime) +func (u *uptime) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.SimpleFileInode) + stateSourceObject.Load(1, &u.startTime) } -func (x *uptimeFile) StateTypeName() string { +func (u *uptimeFile) StateTypeName() string { return "pkg/sentry/fs/proc.uptimeFile" } -func (x *uptimeFile) StateFields() []string { +func (u *uptimeFile) StateFields() []string { return []string{ "startTime", } } -func (x *uptimeFile) beforeSave() {} +func (u *uptimeFile) beforeSave() {} -func (x *uptimeFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.startTime) +func (u *uptimeFile) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.startTime) } -func (x *uptimeFile) afterLoad() {} +func (u *uptimeFile) afterLoad() {} -func (x *uptimeFile) StateLoad(m state.Source) { - m.Load(0, &x.startTime) +func (u *uptimeFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.startTime) } -func (x *versionData) StateTypeName() string { +func (v *versionData) StateTypeName() string { return "pkg/sentry/fs/proc.versionData" } -func (x *versionData) StateFields() []string { +func (v *versionData) StateFields() []string { return []string{ "k", } } -func (x *versionData) beforeSave() {} +func (v *versionData) beforeSave() {} -func (x *versionData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (v *versionData) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.k) } -func (x *versionData) afterLoad() {} +func (v *versionData) afterLoad() {} -func (x *versionData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (v *versionData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.k) } func init() { diff --git a/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go b/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go index 6f48a944a..cc107af96 100644 --- a/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go +++ b/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SeqData) StateTypeName() string { +func (s *SeqData) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.SeqData" } -func (x *SeqData) StateFields() []string { +func (s *SeqData) StateFields() []string { return []string{ "Buf", "Handle", } } -func (x *SeqData) beforeSave() {} +func (s *SeqData) beforeSave() {} -func (x *SeqData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Buf) - m.Save(1, &x.Handle) +func (s *SeqData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Buf) + stateSinkObject.Save(1, &s.Handle) } -func (x *SeqData) afterLoad() {} +func (s *SeqData) afterLoad() {} -func (x *SeqData) StateLoad(m state.Source) { - m.Load(0, &x.Buf) - m.Load(1, &x.Handle) +func (s *SeqData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Buf) + stateSourceObject.Load(1, &s.Handle) } -func (x *SeqFile) StateTypeName() string { +func (s *SeqFile) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.SeqFile" } -func (x *SeqFile) StateFields() []string { +func (s *SeqFile) StateFields() []string { return []string{ "InodeSimpleExtendedAttributes", "InodeSimpleAttributes", @@ -47,50 +47,50 @@ func (x *SeqFile) StateFields() []string { } } -func (x *SeqFile) beforeSave() {} +func (s *SeqFile) beforeSave() {} -func (x *SeqFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleExtendedAttributes) - m.Save(1, &x.InodeSimpleAttributes) - m.Save(2, &x.SeqSource) - m.Save(3, &x.source) - m.Save(4, &x.generation) - m.Save(5, &x.lastRead) +func (s *SeqFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(1, &s.InodeSimpleAttributes) + stateSinkObject.Save(2, &s.SeqSource) + stateSinkObject.Save(3, &s.source) + stateSinkObject.Save(4, &s.generation) + stateSinkObject.Save(5, &s.lastRead) } -func (x *SeqFile) afterLoad() {} +func (s *SeqFile) afterLoad() {} -func (x *SeqFile) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleExtendedAttributes) - m.Load(1, &x.InodeSimpleAttributes) - m.Load(2, &x.SeqSource) - m.Load(3, &x.source) - m.Load(4, &x.generation) - m.Load(5, &x.lastRead) +func (s *SeqFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(1, &s.InodeSimpleAttributes) + stateSourceObject.Load(2, &s.SeqSource) + stateSourceObject.Load(3, &s.source) + stateSourceObject.Load(4, &s.generation) + stateSourceObject.Load(5, &s.lastRead) } -func (x *seqFileOperations) StateTypeName() string { +func (s *seqFileOperations) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.seqFileOperations" } -func (x *seqFileOperations) StateFields() []string { +func (s *seqFileOperations) StateFields() []string { return []string{ "seqFile", } } -func (x *seqFileOperations) beforeSave() {} +func (s *seqFileOperations) beforeSave() {} -func (x *seqFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.seqFile) +func (s *seqFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.seqFile) } -func (x *seqFileOperations) afterLoad() {} +func (s *seqFileOperations) afterLoad() {} -func (x *seqFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.seqFile) +func (s *seqFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.seqFile) } func init() { diff --git a/pkg/sentry/fs/ramfs/ramfs_state_autogen.go b/pkg/sentry/fs/ramfs/ramfs_state_autogen.go index bfa355c84..e4943e646 100644 --- a/pkg/sentry/fs/ramfs/ramfs_state_autogen.go +++ b/pkg/sentry/fs/ramfs/ramfs_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Dir) StateTypeName() string { +func (d *Dir) StateTypeName() string { return "pkg/sentry/fs/ramfs.Dir" } -func (x *Dir) StateFields() []string { +func (d *Dir) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -19,56 +19,56 @@ func (x *Dir) StateFields() []string { } } -func (x *Dir) beforeSave() {} +func (d *Dir) beforeSave() {} -func (x *Dir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.children) - m.Save(3, &x.dentryMap) +func (d *Dir) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.InodeSimpleAttributes) + stateSinkObject.Save(1, &d.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &d.children) + stateSinkObject.Save(3, &d.dentryMap) } -func (x *Dir) afterLoad() {} +func (d *Dir) afterLoad() {} -func (x *Dir) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.children) - m.Load(3, &x.dentryMap) +func (d *Dir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.InodeSimpleAttributes) + stateSourceObject.Load(1, &d.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &d.children) + stateSourceObject.Load(3, &d.dentryMap) } -func (x *dirFileOperations) StateTypeName() string { +func (d *dirFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.dirFileOperations" } -func (x *dirFileOperations) StateFields() []string { +func (d *dirFileOperations) StateFields() []string { return []string{ "dirCursor", "dir", } } -func (x *dirFileOperations) beforeSave() {} +func (d *dirFileOperations) beforeSave() {} -func (x *dirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dirCursor) - m.Save(1, &x.dir) +func (d *dirFileOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dirCursor) + stateSinkObject.Save(1, &d.dir) } -func (x *dirFileOperations) afterLoad() {} +func (d *dirFileOperations) afterLoad() {} -func (x *dirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.dirCursor) - m.Load(1, &x.dir) +func (d *dirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dirCursor) + stateSourceObject.Load(1, &d.dir) } -func (x *Socket) StateTypeName() string { +func (s *Socket) StateTypeName() string { return "pkg/sentry/fs/ramfs.Socket" } -func (x *Socket) StateFields() []string { +func (s *Socket) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -76,47 +76,47 @@ func (x *Socket) StateFields() []string { } } -func (x *Socket) beforeSave() {} +func (s *Socket) beforeSave() {} -func (x *Socket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.ep) +func (s *Socket) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &s.ep) } -func (x *Socket) afterLoad() {} +func (s *Socket) afterLoad() {} -func (x *Socket) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.ep) +func (s *Socket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &s.ep) } -func (x *socketFileOperations) StateTypeName() string { +func (s *socketFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.socketFileOperations" } -func (x *socketFileOperations) StateFields() []string { +func (s *socketFileOperations) StateFields() []string { return []string{} } -func (x *socketFileOperations) beforeSave() {} +func (s *socketFileOperations) beforeSave() {} -func (x *socketFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *socketFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *socketFileOperations) afterLoad() {} +func (s *socketFileOperations) afterLoad() {} -func (x *socketFileOperations) StateLoad(m state.Source) { +func (s *socketFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *Symlink) StateTypeName() string { +func (s *Symlink) StateTypeName() string { return "pkg/sentry/fs/ramfs.Symlink" } -func (x *Symlink) StateFields() []string { +func (s *Symlink) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -124,40 +124,40 @@ func (x *Symlink) StateFields() []string { } } -func (x *Symlink) beforeSave() {} +func (s *Symlink) beforeSave() {} -func (x *Symlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.Target) +func (s *Symlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &s.Target) } -func (x *Symlink) afterLoad() {} +func (s *Symlink) afterLoad() {} -func (x *Symlink) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.Target) +func (s *Symlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &s.Target) } -func (x *symlinkFileOperations) StateTypeName() string { +func (s *symlinkFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.symlinkFileOperations" } -func (x *symlinkFileOperations) StateFields() []string { +func (s *symlinkFileOperations) StateFields() []string { return []string{} } -func (x *symlinkFileOperations) beforeSave() {} +func (s *symlinkFileOperations) beforeSave() {} -func (x *symlinkFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *symlinkFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *symlinkFileOperations) afterLoad() {} +func (s *symlinkFileOperations) afterLoad() {} -func (x *symlinkFileOperations) StateLoad(m state.Source) { +func (s *symlinkFileOperations) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/sys/sys_state_autogen.go b/pkg/sentry/fs/sys/sys_state_autogen.go index 71e08a167..390f092cb 100644 --- a/pkg/sentry/fs/sys/sys_state_autogen.go +++ b/pkg/sentry/fs/sys/sys_state_autogen.go @@ -6,49 +6,49 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *cpunum) StateTypeName() string { +func (c *cpunum) StateTypeName() string { return "pkg/sentry/fs/sys.cpunum" } -func (x *cpunum) StateFields() []string { +func (c *cpunum) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeStaticFileGetter", } } -func (x *cpunum) beforeSave() {} +func (c *cpunum) beforeSave() {} -func (x *cpunum) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeStaticFileGetter) +func (c *cpunum) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.InodeSimpleAttributes) + stateSinkObject.Save(1, &c.InodeStaticFileGetter) } -func (x *cpunum) afterLoad() {} +func (c *cpunum) afterLoad() {} -func (x *cpunum) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeStaticFileGetter) +func (c *cpunum) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.InodeSimpleAttributes) + stateSourceObject.Load(1, &c.InodeStaticFileGetter) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/sys.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go index 2a411ceab..15f2d63f6 100644 --- a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go +++ b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go @@ -6,33 +6,33 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *TimerOperations) StateTypeName() string { +func (t *TimerOperations) StateTypeName() string { return "pkg/sentry/fs/timerfd.TimerOperations" } -func (x *TimerOperations) StateFields() []string { +func (t *TimerOperations) StateFields() []string { return []string{ "timer", "val", } } -func (x *TimerOperations) beforeSave() {} +func (t *TimerOperations) beforeSave() {} -func (x *TimerOperations) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.events) { - state.Failf("events is %#v, expected zero", &x.events) +func (t *TimerOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + if !state.IsZeroValue(&t.events) { + state.Failf("events is %#v, expected zero", &t.events) } - m.Save(0, &x.timer) - m.Save(1, &x.val) + stateSinkObject.Save(0, &t.timer) + stateSinkObject.Save(1, &t.val) } -func (x *TimerOperations) afterLoad() {} +func (t *TimerOperations) afterLoad() {} -func (x *TimerOperations) StateLoad(m state.Source) { - m.Load(0, &x.timer) - m.Load(1, &x.val) +func (t *TimerOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.timer) + stateSourceObject.Load(1, &t.val) } func init() { diff --git a/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go b/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go index 894d3679e..29c25b4d6 100644 --- a/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go +++ b/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go @@ -6,53 +6,53 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *regularFileOperations) StateTypeName() string { +func (r *regularFileOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.regularFileOperations" } -func (x *regularFileOperations) StateFields() []string { +func (r *regularFileOperations) StateFields() []string { return []string{ "iops", } } -func (x *regularFileOperations) beforeSave() {} +func (r *regularFileOperations) beforeSave() {} -func (x *regularFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (r *regularFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.iops) } -func (x *regularFileOperations) afterLoad() {} +func (r *regularFileOperations) afterLoad() {} -func (x *regularFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (r *regularFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.iops) } -func (x *Filesystem) StateTypeName() string { +func (f *Filesystem) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Filesystem" } -func (x *Filesystem) StateFields() []string { +func (f *Filesystem) StateFields() []string { return []string{} } -func (x *Filesystem) beforeSave() {} +func (f *Filesystem) beforeSave() {} -func (x *Filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *Filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *Filesystem) afterLoad() {} +func (f *Filesystem) afterLoad() {} -func (x *Filesystem) StateLoad(m state.Source) { +func (f *Filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *fileInodeOperations) StateTypeName() string { +func (f *fileInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.fileInodeOperations" } -func (x *fileInodeOperations) StateFields() []string { +func (f *fileInodeOperations) StateFields() []string { return []string{ "InodeSimpleExtendedAttributes", "kernel", @@ -65,125 +65,125 @@ func (x *fileInodeOperations) StateFields() []string { } } -func (x *fileInodeOperations) beforeSave() {} +func (f *fileInodeOperations) beforeSave() {} -func (x *fileInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleExtendedAttributes) - m.Save(1, &x.kernel) - m.Save(2, &x.memUsage) - m.Save(3, &x.attr) - m.Save(4, &x.mappings) - m.Save(5, &x.writableMappingPages) - m.Save(6, &x.data) - m.Save(7, &x.seals) +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 (x *fileInodeOperations) afterLoad() {} +func (f *fileInodeOperations) afterLoad() {} -func (x *fileInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleExtendedAttributes) - m.Load(1, &x.kernel) - m.Load(2, &x.memUsage) - m.Load(3, &x.attr) - m.Load(4, &x.mappings) - m.Load(5, &x.writableMappingPages) - m.Load(6, &x.data) - m.Load(7, &x.seals) +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 (x *Dir) StateTypeName() string { +func (d *Dir) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Dir" } -func (x *Dir) StateFields() []string { +func (d *Dir) StateFields() []string { return []string{ "ramfsDir", "kernel", } } -func (x *Dir) beforeSave() {} +func (d *Dir) beforeSave() {} -func (x *Dir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ramfsDir) - m.Save(1, &x.kernel) +func (d *Dir) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.ramfsDir) + stateSinkObject.Save(1, &d.kernel) } -func (x *Dir) StateLoad(m state.Source) { - m.Load(0, &x.ramfsDir) - m.Load(1, &x.kernel) - m.AfterLoad(x.afterLoad) +func (d *Dir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.ramfsDir) + stateSourceObject.Load(1, &d.kernel) + stateSourceObject.AfterLoad(d.afterLoad) } -func (x *Symlink) StateTypeName() string { +func (s *Symlink) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Symlink" } -func (x *Symlink) StateFields() []string { +func (s *Symlink) StateFields() []string { return []string{ "Symlink", } } -func (x *Symlink) beforeSave() {} +func (s *Symlink) beforeSave() {} -func (x *Symlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) +func (s *Symlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Symlink) } -func (x *Symlink) afterLoad() {} +func (s *Symlink) afterLoad() {} -func (x *Symlink) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) +func (s *Symlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Symlink) } -func (x *Socket) StateTypeName() string { +func (s *Socket) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Socket" } -func (x *Socket) StateFields() []string { +func (s *Socket) StateFields() []string { return []string{ "Socket", } } -func (x *Socket) beforeSave() {} +func (s *Socket) beforeSave() {} -func (x *Socket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Socket) +func (s *Socket) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Socket) } -func (x *Socket) afterLoad() {} +func (s *Socket) afterLoad() {} -func (x *Socket) StateLoad(m state.Source) { - m.Load(0, &x.Socket) +func (s *Socket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Socket) } -func (x *Fifo) StateTypeName() string { +func (f *Fifo) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Fifo" } -func (x *Fifo) StateFields() []string { +func (f *Fifo) StateFields() []string { return []string{ "InodeOperations", } } -func (x *Fifo) beforeSave() {} +func (f *Fifo) beforeSave() {} -func (x *Fifo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) +func (f *Fifo) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeOperations) } -func (x *Fifo) afterLoad() {} +func (f *Fifo) afterLoad() {} -func (x *Fifo) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) +func (f *Fifo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeOperations) } func init() { diff --git a/pkg/sentry/fs/tty/tty_state_autogen.go b/pkg/sentry/fs/tty/tty_state_autogen.go index d5c03a27f..c644ea9db 100644 --- a/pkg/sentry/fs/tty/tty_state_autogen.go +++ b/pkg/sentry/fs/tty/tty_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *dirInodeOperations) StateTypeName() string { +func (d *dirInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.dirInodeOperations" } -func (x *dirInodeOperations) StateFields() []string { +func (d *dirInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", "msrc", @@ -21,98 +21,98 @@ func (x *dirInodeOperations) StateFields() []string { } } -func (x *dirInodeOperations) beforeSave() {} +func (d *dirInodeOperations) beforeSave() {} -func (x *dirInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.msrc) - m.Save(2, &x.master) - m.Save(3, &x.replicas) - m.Save(4, &x.dentryMap) - m.Save(5, &x.next) +func (d *dirInodeOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.InodeSimpleAttributes) + stateSinkObject.Save(1, &d.msrc) + stateSinkObject.Save(2, &d.master) + stateSinkObject.Save(3, &d.replicas) + stateSinkObject.Save(4, &d.dentryMap) + stateSinkObject.Save(5, &d.next) } -func (x *dirInodeOperations) afterLoad() {} +func (d *dirInodeOperations) afterLoad() {} -func (x *dirInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.msrc) - m.Load(2, &x.master) - m.Load(3, &x.replicas) - m.Load(4, &x.dentryMap) - m.Load(5, &x.next) +func (d *dirInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.InodeSimpleAttributes) + stateSourceObject.Load(1, &d.msrc) + stateSourceObject.Load(2, &d.master) + stateSourceObject.Load(3, &d.replicas) + stateSourceObject.Load(4, &d.dentryMap) + stateSourceObject.Load(5, &d.next) } -func (x *dirFileOperations) StateTypeName() string { +func (d *dirFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.dirFileOperations" } -func (x *dirFileOperations) StateFields() []string { +func (d *dirFileOperations) StateFields() []string { return []string{ "di", "dirCursor", } } -func (x *dirFileOperations) beforeSave() {} +func (d *dirFileOperations) beforeSave() {} -func (x *dirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.di) - m.Save(1, &x.dirCursor) +func (d *dirFileOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.di) + stateSinkObject.Save(1, &d.dirCursor) } -func (x *dirFileOperations) afterLoad() {} +func (d *dirFileOperations) afterLoad() {} -func (x *dirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.di) - m.Load(1, &x.dirCursor) +func (d *dirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.di) + stateSourceObject.Load(1, &d.dirCursor) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/tty.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *superOperations) StateTypeName() string { +func (s *superOperations) StateTypeName() string { return "pkg/sentry/fs/tty.superOperations" } -func (x *superOperations) StateFields() []string { +func (s *superOperations) StateFields() []string { return []string{} } -func (x *superOperations) beforeSave() {} +func (s *superOperations) beforeSave() {} -func (x *superOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *superOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *superOperations) afterLoad() {} +func (s *superOperations) afterLoad() {} -func (x *superOperations) StateLoad(m state.Source) { +func (s *superOperations) StateLoad(stateSourceObject state.Source) { } -func (x *lineDiscipline) StateTypeName() string { +func (l *lineDiscipline) StateTypeName() string { return "pkg/sentry/fs/tty.lineDiscipline" } -func (x *lineDiscipline) StateFields() []string { +func (l *lineDiscipline) StateFields() []string { return []string{ "size", "inQueue", @@ -122,128 +122,128 @@ func (x *lineDiscipline) StateFields() []string { } } -func (x *lineDiscipline) beforeSave() {} +func (l *lineDiscipline) beforeSave() {} -func (x *lineDiscipline) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.masterWaiter) { - state.Failf("masterWaiter is %#v, expected zero", &x.masterWaiter) +func (l *lineDiscipline) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + if !state.IsZeroValue(&l.masterWaiter) { + state.Failf("masterWaiter is %#v, expected zero", &l.masterWaiter) } - if !state.IsZeroValue(&x.replicaWaiter) { - state.Failf("replicaWaiter is %#v, expected zero", &x.replicaWaiter) + if !state.IsZeroValue(&l.replicaWaiter) { + state.Failf("replicaWaiter is %#v, expected zero", &l.replicaWaiter) } - m.Save(0, &x.size) - m.Save(1, &x.inQueue) - m.Save(2, &x.outQueue) - m.Save(3, &x.termios) - m.Save(4, &x.column) + stateSinkObject.Save(0, &l.size) + stateSinkObject.Save(1, &l.inQueue) + stateSinkObject.Save(2, &l.outQueue) + stateSinkObject.Save(3, &l.termios) + stateSinkObject.Save(4, &l.column) } -func (x *lineDiscipline) afterLoad() {} +func (l *lineDiscipline) afterLoad() {} -func (x *lineDiscipline) StateLoad(m state.Source) { - m.Load(0, &x.size) - m.Load(1, &x.inQueue) - m.Load(2, &x.outQueue) - m.Load(3, &x.termios) - m.Load(4, &x.column) +func (l *lineDiscipline) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.size) + stateSourceObject.Load(1, &l.inQueue) + stateSourceObject.Load(2, &l.outQueue) + stateSourceObject.Load(3, &l.termios) + stateSourceObject.Load(4, &l.column) } -func (x *outputQueueTransformer) StateTypeName() string { +func (o *outputQueueTransformer) StateTypeName() string { return "pkg/sentry/fs/tty.outputQueueTransformer" } -func (x *outputQueueTransformer) StateFields() []string { +func (o *outputQueueTransformer) StateFields() []string { return []string{} } -func (x *outputQueueTransformer) beforeSave() {} +func (o *outputQueueTransformer) beforeSave() {} -func (x *outputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (o *outputQueueTransformer) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *outputQueueTransformer) afterLoad() {} +func (o *outputQueueTransformer) afterLoad() {} -func (x *outputQueueTransformer) StateLoad(m state.Source) { +func (o *outputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *inputQueueTransformer) StateTypeName() string { +func (i *inputQueueTransformer) StateTypeName() string { return "pkg/sentry/fs/tty.inputQueueTransformer" } -func (x *inputQueueTransformer) StateFields() []string { +func (i *inputQueueTransformer) StateFields() []string { return []string{} } -func (x *inputQueueTransformer) beforeSave() {} +func (i *inputQueueTransformer) beforeSave() {} -func (x *inputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (i *inputQueueTransformer) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *inputQueueTransformer) afterLoad() {} +func (i *inputQueueTransformer) afterLoad() {} -func (x *inputQueueTransformer) StateLoad(m state.Source) { +func (i *inputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *masterInodeOperations) StateTypeName() string { +func (m *masterInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.masterInodeOperations" } -func (x *masterInodeOperations) StateFields() []string { +func (m *masterInodeOperations) StateFields() []string { return []string{ "SimpleFileInode", "d", } } -func (x *masterInodeOperations) beforeSave() {} +func (m *masterInodeOperations) beforeSave() {} -func (x *masterInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.d) +func (m *masterInodeOperations) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.SimpleFileInode) + stateSinkObject.Save(1, &m.d) } -func (x *masterInodeOperations) afterLoad() {} +func (m *masterInodeOperations) afterLoad() {} -func (x *masterInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.d) +func (m *masterInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.SimpleFileInode) + stateSourceObject.Load(1, &m.d) } -func (x *masterFileOperations) StateTypeName() string { +func (m *masterFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.masterFileOperations" } -func (x *masterFileOperations) StateFields() []string { +func (m *masterFileOperations) StateFields() []string { return []string{ "d", "t", } } -func (x *masterFileOperations) beforeSave() {} +func (m *masterFileOperations) beforeSave() {} -func (x *masterFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.d) - m.Save(1, &x.t) +func (m *masterFileOperations) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.d) + stateSinkObject.Save(1, &m.t) } -func (x *masterFileOperations) afterLoad() {} +func (m *masterFileOperations) afterLoad() {} -func (x *masterFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.d) - m.Load(1, &x.t) +func (m *masterFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.d) + stateSourceObject.Load(1, &m.t) } -func (x *queue) StateTypeName() string { +func (q *queue) StateTypeName() string { return "pkg/sentry/fs/tty.queue" } -func (x *queue) StateFields() []string { +func (q *queue) StateFields() []string { return []string{ "readBuf", "waitBuf", @@ -253,32 +253,32 @@ func (x *queue) StateFields() []string { } } -func (x *queue) beforeSave() {} +func (q *queue) beforeSave() {} -func (x *queue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.readBuf) - m.Save(1, &x.waitBuf) - m.Save(2, &x.waitBufLen) - m.Save(3, &x.readable) - m.Save(4, &x.transformer) +func (q *queue) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.readBuf) + stateSinkObject.Save(1, &q.waitBuf) + stateSinkObject.Save(2, &q.waitBufLen) + stateSinkObject.Save(3, &q.readable) + stateSinkObject.Save(4, &q.transformer) } -func (x *queue) afterLoad() {} +func (q *queue) afterLoad() {} -func (x *queue) StateLoad(m state.Source) { - m.Load(0, &x.readBuf) - m.Load(1, &x.waitBuf) - m.Load(2, &x.waitBufLen) - m.Load(3, &x.readable) - m.Load(4, &x.transformer) +func (q *queue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.readBuf) + stateSourceObject.Load(1, &q.waitBuf) + stateSourceObject.Load(2, &q.waitBufLen) + stateSourceObject.Load(3, &q.readable) + stateSourceObject.Load(4, &q.transformer) } -func (x *replicaInodeOperations) StateTypeName() string { +func (r *replicaInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.replicaInodeOperations" } -func (x *replicaInodeOperations) StateFields() []string { +func (r *replicaInodeOperations) StateFields() []string { return []string{ "SimpleFileInode", "d", @@ -286,51 +286,51 @@ func (x *replicaInodeOperations) StateFields() []string { } } -func (x *replicaInodeOperations) beforeSave() {} +func (r *replicaInodeOperations) beforeSave() {} -func (x *replicaInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.d) - m.Save(2, &x.t) +func (r *replicaInodeOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.SimpleFileInode) + stateSinkObject.Save(1, &r.d) + stateSinkObject.Save(2, &r.t) } -func (x *replicaInodeOperations) afterLoad() {} +func (r *replicaInodeOperations) afterLoad() {} -func (x *replicaInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.d) - m.Load(2, &x.t) +func (r *replicaInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.SimpleFileInode) + stateSourceObject.Load(1, &r.d) + stateSourceObject.Load(2, &r.t) } -func (x *replicaFileOperations) StateTypeName() string { +func (r *replicaFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.replicaFileOperations" } -func (x *replicaFileOperations) StateFields() []string { +func (r *replicaFileOperations) StateFields() []string { return []string{ "si", } } -func (x *replicaFileOperations) beforeSave() {} +func (r *replicaFileOperations) beforeSave() {} -func (x *replicaFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.si) +func (r *replicaFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.si) } -func (x *replicaFileOperations) afterLoad() {} +func (r *replicaFileOperations) afterLoad() {} -func (x *replicaFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.si) +func (r *replicaFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.si) } -func (x *Terminal) StateTypeName() string { +func (t *Terminal) StateTypeName() string { return "pkg/sentry/fs/tty.Terminal" } -func (x *Terminal) StateFields() []string { +func (t *Terminal) StateFields() []string { return []string{ "AtomicRefCount", "n", @@ -341,27 +341,27 @@ func (x *Terminal) StateFields() []string { } } -func (x *Terminal) beforeSave() {} +func (t *Terminal) beforeSave() {} -func (x *Terminal) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.n) - m.Save(2, &x.d) - m.Save(3, &x.ld) - m.Save(4, &x.masterKTTY) - m.Save(5, &x.replicaKTTY) +func (t *Terminal) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.AtomicRefCount) + stateSinkObject.Save(1, &t.n) + stateSinkObject.Save(2, &t.d) + stateSinkObject.Save(3, &t.ld) + stateSinkObject.Save(4, &t.masterKTTY) + stateSinkObject.Save(5, &t.replicaKTTY) } -func (x *Terminal) afterLoad() {} +func (t *Terminal) afterLoad() {} -func (x *Terminal) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.n) - m.Load(2, &x.d) - m.Load(3, &x.ld) - m.Load(4, &x.masterKTTY) - m.Load(5, &x.replicaKTTY) +func (t *Terminal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.AtomicRefCount) + stateSourceObject.Load(1, &t.n) + stateSourceObject.Load(2, &t.d) + stateSourceObject.Load(3, &t.ld) + stateSourceObject.Load(4, &t.masterKTTY) + stateSourceObject.Load(5, &t.replicaKTTY) } func init() { |