diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
commit | 9183888b520beeee8609170819a28bea89202909 (patch) | |
tree | 3cdcfa4de9ced4c539ab7c57e4cf58ffea980f6c /pkg/sentry/fsimpl/host | |
parent | cab13958a54419262aba2a0cd7f1075ed02c8ee0 (diff) | |
parent | 364ac92baf83f2352f78b718090472639bd92a76 (diff) |
Merge release-20200608.0-119-g364ac92ba (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/host')
-rw-r--r-- | pkg/sentry/fsimpl/host/host_state_autogen.go | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/pkg/sentry/fsimpl/host/host_state_autogen.go b/pkg/sentry/fsimpl/host/host_state_autogen.go index 28bc79d04..17320c417 100644 --- a/pkg/sentry/fsimpl/host/host_state_autogen.go +++ b/pkg/sentry/fsimpl/host/host_state_autogen.go @@ -6,23 +6,38 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *ConnectedEndpoint) StateTypeName() string { + return "pkg/sentry/fsimpl/host.ConnectedEndpoint" +} + +func (x *ConnectedEndpoint) StateFields() []string { + return []string{ + "ref", + "fd", + "addr", + "stype", + } +} + func (x *ConnectedEndpoint) beforeSave() {} -func (x *ConnectedEndpoint) save(m state.Map) { + +func (x *ConnectedEndpoint) StateSave(m state.Sink) { x.beforeSave() - m.Save("ref", &x.ref) - m.Save("fd", &x.fd) - m.Save("addr", &x.addr) - m.Save("stype", &x.stype) + m.Save(0, &x.ref) + m.Save(1, &x.fd) + m.Save(2, &x.addr) + m.Save(3, &x.stype) } func (x *ConnectedEndpoint) afterLoad() {} -func (x *ConnectedEndpoint) load(m state.Map) { - m.Load("ref", &x.ref) - m.Load("fd", &x.fd) - m.Load("addr", &x.addr) - m.Load("stype", &x.stype) + +func (x *ConnectedEndpoint) StateLoad(m state.Source) { + m.Load(0, &x.ref) + m.Load(1, &x.fd) + m.Load(2, &x.addr) + m.Load(3, &x.stype) } func init() { - state.Register("pkg/sentry/fsimpl/host.ConnectedEndpoint", (*ConnectedEndpoint)(nil), state.Fns{Save: (*ConnectedEndpoint).save, Load: (*ConnectedEndpoint).load}) + state.Register((*ConnectedEndpoint)(nil)) } |