From 1e96f095b84570ffcf5ea9fc4c962a18148b6385 Mon Sep 17 00:00:00 2001 From: Darragh O'Reilly Date: Thu, 19 Sep 2024 12:38:03 +0100 Subject: [PATCH] Fix filter by arch on s390x Allow adding rules with filters like "-F arch=b64" and "-F arch=b32" --- rule/rule.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rule/rule.go b/rule/rule.go index 7c73b97..ee7e347 100644 --- a/rule/rule.go +++ b/rule/rule.go @@ -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) @@ -875,7 +875,7 @@ func getArch(arch string) (string, uint32, error) { } switch runtimeArch { - case "arm", "i386": + case "arm", "i386", "s390": realArch = runtimeArch case "aarch64": realArch = "arm" @@ -883,6 +883,8 @@ func getArch(arch string) (string, uint32, error) { realArch = "i386" case "ppc64": realArch = "ppc" + case "s390x": + realArch = "s390" default: return "", 0, fmt.Errorf("cannot use b32 on %v", runtimeArch) }