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/socket/netlink/port | |
parent | cab13958a54419262aba2a0cd7f1075ed02c8ee0 (diff) | |
parent | 364ac92baf83f2352f78b718090472639bd92a76 (diff) |
Merge release-20200608.0-119-g364ac92ba (automated)
Diffstat (limited to 'pkg/sentry/socket/netlink/port')
-rw-r--r-- | pkg/sentry/socket/netlink/port/port_state_autogen.go | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pkg/sentry/socket/netlink/port/port_state_autogen.go b/pkg/sentry/socket/netlink/port/port_state_autogen.go index c509cc7d5..16c59e616 100644 --- a/pkg/sentry/socket/netlink/port/port_state_autogen.go +++ b/pkg/sentry/socket/netlink/port/port_state_autogen.go @@ -6,17 +6,29 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *Manager) StateTypeName() string { + return "pkg/sentry/socket/netlink/port.Manager" +} + +func (x *Manager) StateFields() []string { + return []string{ + "ports", + } +} + func (x *Manager) beforeSave() {} -func (x *Manager) save(m state.Map) { + +func (x *Manager) StateSave(m state.Sink) { x.beforeSave() - m.Save("ports", &x.ports) + m.Save(0, &x.ports) } func (x *Manager) afterLoad() {} -func (x *Manager) load(m state.Map) { - m.Load("ports", &x.ports) + +func (x *Manager) StateLoad(m state.Source) { + m.Load(0, &x.ports) } func init() { - state.Register("pkg/sentry/socket/netlink/port.Manager", (*Manager)(nil), state.Fns{Save: (*Manager).save, Load: (*Manager).load}) + state.Register((*Manager)(nil)) } |