MCPcopy
hub / github.com/cilium/ebpf / errNonLinux

Function errNonLinux

internal/unix/error.go:13–23  ·  view source on GitHub ↗

errNonLinux returns an error which wraps [internal.ErrNotSupportedOnOS] and includes the name of the calling function.

()

Source from the content-addressed store, hash-verified

11// errNonLinux returns an error which wraps [internal.ErrNotSupportedOnOS] and
12// includes the name of the calling function.
13func errNonLinux() error {
14 name := "unknown"
15 pc, _, _, ok := runtime.Caller(1)
16 if ok {
17 name = runtime.FuncForPC(pc).Name()
18 if pos := strings.LastIndexByte(name, '.'); pos != -1 {
19 name = name[pos+1:]
20 }
21 }
22 return fmt.Errorf("unix: %s: %w", name, internal.ErrNotSupportedOnOS)
23}

Callers 15

BytePtrFromStringFunction · 0.85
ByteSliceFromStringFunction · 0.85
PthreadSigmaskFunction · 0.85
FcntlIntFunction · 0.85
IoctlSetIntFunction · 0.85
StatfsFunction · 0.85
CloseFunction · 0.85
EpollWaitFunction · 0.85
EpollCtlFunction · 0.85
EventfdFunction · 0.85
WriteFunction · 0.85
EpollCreate1Function · 0.85

Calls 1

NameMethod · 0.80

Tested by 1

TestErrNonLinuxFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…