Skip to content

Commit

Permalink
chore(pkg/driver): do not fail if /sys/kernel/debug fails to be mounted.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Nov 30, 2023
1 parent 610e851 commit 2efc9e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/driver/type/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ func (b *bpf) Cleanup(printer *output.Printer, _ string) error {
// https://github.com/torvalds/linux/commit/c4f6699dfcb8558d138fe838f741b2c10f416cf9
printer.Logger.Info("Mounting debugfs for bpf driver.")
mounter := mount.New("/bin/mount")
return mounter.Mount("debugfs", "/sys/kernel/debug", "debugfs", []string{"nodev"})
// We don't fail if this fails; let's try to build a probe anyway.
_ = mounter.Mount("debugfs", "/sys/kernel/debug", "debugfs", []string{"nodev"})
return nil
}

func (b *bpf) Load(_ *output.Printer, _ string, _ bool) error {
Expand Down

0 comments on commit 2efc9e2

Please sign in to comment.