From 7560799c75f65327fe726b5b4b256d23b341709c Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Mon, 24 Apr 2023 20:27:30 +0100 Subject: sys/targets: introduce HasCallNumber to reduce clutter This centralizes all strings.HasPrefix(callName, "syz_") checks. --- sys/targets/targets.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/targets') diff --git a/sys/targets/targets.go b/sys/targets/targets.go index 99c64725a..67c3161e4 100644 --- a/sys/targets/targets.go +++ b/sys/targets/targets.go @@ -46,6 +46,10 @@ type Target struct { timeouts Timeouts } +func (target *Target) HasCallNumber(callName string) bool { + return target.SyscallNumbers && !strings.HasPrefix(callName, "syz_") +} + type osCommon struct { // What OS can build native binaries for this OS. // If not set, defaults to itself (i.e. native build). -- cgit mrf-deployment