Skip to content

Commit

Permalink
libbpf: replace Detach() with Destroy() for KABPFLink
Browse files Browse the repository at this point in the history
Detach was introduced as a temporary empty method.

After discussions

aquasecurity/libbpfgo#74
aquasecurity/libbpfgo#78

it was understood that it isn't feasible to use Detach() directly.

In the meantime, Destroy() was implemented by a third contributor.

aquasecurity/libbpfgo#69

This get rids of the previous empty function making room for the
Destroy() wrapper.
  • Loading branch information
geyslan committed Sep 28, 2021
1 parent f194dbf commit 57b4db3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libbpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (l *KABPFLink) Program() *KABPFProgram {
return l.bpfProg
}

// Detach link
func (l *KABPFLink) Detach() error {
return nil
// Destroy link
func (l *KABPFLink) Destroy() error {
return l.bpfLink.Destroy()
}

0 comments on commit 57b4db3

Please sign in to comment.