aboutsummaryrefslogtreecommitdiffstats
path: root/sys/targets
diff options
context:
space:
mode:
authorGreg Steuck <greg@nest.cx>2023-04-24 20:27:30 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-04-25 17:36:18 +0200
commit7560799c75f65327fe726b5b4b256d23b341709c (patch)
tree17248a13063e63424fe909003ec4cf523529fcb0 /sys/targets
parent9ceb3140bbe76018aa28dde0297f1139717373dc (diff)
sys/targets: introduce HasCallNumber to reduce clutter
This centralizes all strings.HasPrefix(callName, "syz_") checks.
Diffstat (limited to 'sys/targets')
-rw-r--r--sys/targets/targets.go4
1 files changed, 4 insertions, 0 deletions
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).