Skip to content

Commit ffcb036

Browse files
committed
link/kprobe: fix up misleading docstring on createTraceFSProbeEvent
Signed-off-by: Timo Beckers <[email protected]>
1 parent 29f67e0 commit ffcb036

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

link/kprobe.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ func tracefsProbe(typ probeType, symbol, path string, offset uint64, ret bool) (
298298
}
299299

300300
// createTraceFSProbeEvent creates a new ephemeral trace event by writing to
301-
// <tracefs>/[k,u]probe_events. Returns ErrNotSupported if symbol is not a valid
302-
// kernel symbol, or if it is not traceable with kprobes.
301+
// <tracefs>/[k,u]probe_events. Returns os.ErrNotExist if symbol is not a valid
302+
// kernel symbol, or if it is not traceable with kprobes. Returns os.ErrExist
303+
// if a probe with the same group and symbol already exists.
303304
func createTraceFSProbeEvent(typ probeType, group, symbol, path string, offset uint64, ret bool) error {
304305
// Open the kprobe_events file in tracefs.
305306
f, err := os.OpenFile(typ.EventsPath(), os.O_APPEND|os.O_WRONLY, 0666)

0 commit comments

Comments
 (0)