Skip to content

Commit

Permalink
Abort if runtime.GOARCH is not amd64
Browse files Browse the repository at this point in the history
Signed-off-by: gray <gray.liang@isovalent.com>
  • Loading branch information
jschwinger233 committed Jul 9, 2024
1 parent 01dc5f0 commit b64a3c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"log"
"os"
"os/signal"
"runtime"
"syscall"
"time"

Expand All @@ -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,
Expand Down

0 comments on commit b64a3c0

Please sign in to comment.