diff options
Diffstat (limited to 'pkg/bpf')
-rw-r--r-- | pkg/bpf/bpf_state_autogen.go | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pkg/bpf/bpf_state_autogen.go b/pkg/bpf/bpf_state_autogen.go index ae8a36d57..43dd9ff9e 100644 --- a/pkg/bpf/bpf_state_autogen.go +++ b/pkg/bpf/bpf_state_autogen.go @@ -6,17 +6,29 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *Program) StateTypeName() string { + return "pkg/bpf.Program" +} + +func (x *Program) StateFields() []string { + return []string{ + "instructions", + } +} + func (x *Program) beforeSave() {} -func (x *Program) save(m state.Map) { + +func (x *Program) StateSave(m state.Sink) { x.beforeSave() - m.Save("instructions", &x.instructions) + m.Save(0, &x.instructions) } func (x *Program) afterLoad() {} -func (x *Program) load(m state.Map) { - m.Load("instructions", &x.instructions) + +func (x *Program) StateLoad(m state.Source) { + m.Load(0, &x.instructions) } func init() { - state.Register("pkg/bpf.Program", (*Program)(nil), state.Fns{Save: (*Program).save, Load: (*Program).load}) + state.Register((*Program)(nil)) } |