Skip to content

Commit

Permalink
Fix filter by arch on s390x
Browse files Browse the repository at this point in the history
Allow adding rules with filters like "-F arch=b64" and "-F arch=b32"
  • Loading branch information
djoreilly committed Sep 19, 2024
1 parent f626137 commit 1e96f09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ func getArch(arch string) (string, uint32, error) {
}

switch runtimeArch {
case "aarch64", "x86_64", "ppc64":
case "aarch64", "x86_64", "ppc64", "s390x":
realArch = runtimeArch
default:
return "", 0, fmt.Errorf("cannot use b64 on %v", runtimeArch)
Expand All @@ -875,14 +875,16 @@ func getArch(arch string) (string, uint32, error) {
}

switch runtimeArch {
case "arm", "i386":
case "arm", "i386", "s390":
realArch = runtimeArch
case "aarch64":
realArch = "arm"
case "x86_64":
realArch = "i386"
case "ppc64":
realArch = "ppc"
case "s390x":
realArch = "s390"
default:
return "", 0, fmt.Errorf("cannot use b32 on %v", runtimeArch)
}
Expand Down

0 comments on commit 1e96f09

Please sign in to comment.