diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-26 10:37:40 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-26 10:37:40 +0200 |
| commit | 4302cbf28a9d9efd2416ab6ea95168f9e39c29ec (patch) | |
| tree | 90e4dfb2f9cc71e483396c3465859d1282282348 /internal/event/pair.go | |
| parent | c661b23f2940e07a1e1cbe16334598d999096f27 (diff) | |
tui: add fd trace drilldown and fd column in stream
Diffstat (limited to 'internal/event/pair.go')
| -rw-r--r-- | internal/event/pair.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/event/pair.go b/internal/event/pair.go index 28b553d..b6dc80c 100644 --- a/internal/event/pair.go +++ b/internal/event/pair.go @@ -102,6 +102,17 @@ func (e *Pair) FileName() string { return e.File.Name() } +func (e *Pair) FileDescriptor() (int32, bool) { + if e.File == nil { + return 0, false + } + fd := e.File.FD() + if fd < 0 { + return 0, false + } + return fd, true +} + func (e *Pair) Dump() string { return fmt.Sprintf("%v with enterEv(%v) and exitEv(%v)", e, e.EnterEv, e.ExitEv) } |
