From 002170fbae88011602918a0d73675bfdb6fe4200 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Apr 2025 08:03:22 +0200 Subject: pkg/declextract: more precise fileops callback resolution Use resolved Function references instead of string names for fileops callback resolution. Function names are not unique, a number of callbacks have the same names. --- pkg/declextract/entity.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/declextract/entity.go') diff --git a/pkg/declextract/entity.go b/pkg/declextract/entity.go index d52d265f4..d0a309a0f 100644 --- a/pkg/declextract/entity.go +++ b/pkg/declextract/entity.go @@ -89,6 +89,17 @@ type FileOps struct { Mmap string `json:"mmap,omitempty"` Ioctl string `json:"ioctl,omitempty"` SourceFile string `json:"source_file,omitempty"` + + *fileOps +} + +type fileOps struct { + open *Function + read *Function + write *Function + mmap *Function + ioctl *Function + ops []*Function // all non-nil callbacks } type Ioctl struct { -- cgit mrf-deployment