From b64a3c00f37f39b60d468416ca3602fb048f48d4 Mon Sep 17 00:00:00 2001 From: gray Date: Tue, 9 Jul 2024 18:30:55 +0800 Subject: [PATCH] Abort if runtime.GOARCH is not amd64 Signed-off-by: gray --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index 19e9bc0b..d037c821 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "log" "os" "os/signal" + "runtime" "syscall" "time" @@ -36,6 +37,11 @@ func main() { fmt.Printf("pwru %s\n", pwru.Version) os.Exit(0) } + if flags.FilterTrackBpfHelpers { + if runtime.GOARCH != "amd64" { + log.Fatalf("BPF helpers tracking is only supported on amd64") + } + } if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{ Cur: 8192,