summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2015-08-28 15:38:34 -0400
committerPaul Moore <pmoore@redhat.com>2015-08-28 15:38:34 -0400
commitfc886cbe8128e8544f5d197dfd0971403ee203b5 (patch)
tree71e20e3c8acac4b67da61842bef34e23f972ebe9 /tools
parent6e26af4f027f6d6d3c8045f3b2c57b2255e911e3 (diff)
parenta06972c8f7a287b83d3d5237f83b17ec2ab2047e (diff)
downloadlibseccomp-fc886cbe8128e8544f5d197dfd0971403ee203b5.tar.gz
Merge branch 'working-s390' into master
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/scmp_arch_detect.c10
-rw-r--r--tools/scmp_bpf_sim.c8
-rw-r--r--tools/util.c4
3 files changed, 18 insertions, 4 deletions
diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c
index 03644c6..51c45c9 100644
--- a/tools/scmp_arch_detect.c
+++ b/tools/scmp_arch_detect.c
@@ -99,14 +99,20 @@ int main(int argc, char *argv[])
case SCMP_ARCH_MIPSEL64N32:
printf("mipsel64n32\n");
break;
+ case SCMP_ARCH_PPC:
+ printf("ppc\n");
+ break;
case SCMP_ARCH_PPC64:
printf("ppc64\n");
break;
case SCMP_ARCH_PPC64LE:
printf("ppc64le\n");
break;
- case SCMP_ARCH_PPC:
- printf("ppc\n");
+ case SCMP_ARCH_S390:
+ printf("s390\n");
+ break;
+ case SCMP_ARCH_S390X:
+ printf("s390x\n");
break;
default:
printf("unknown\n");
diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c
index 6b70105..ddd216c 100644
--- a/tools/scmp_bpf_sim.c
+++ b/tools/scmp_bpf_sim.c
@@ -265,12 +265,16 @@ int main(int argc, char *argv[])
arch = AUDIT_ARCH_MIPS64N32;
else if (strcmp(optarg, "mipsel64n32") == 0)
arch = AUDIT_ARCH_MIPSEL64N32;
+ else if (strcmp(optarg, "ppc") == 0)
+ arch = AUDIT_ARCH_PPC;
else if (strcmp(optarg, "ppc64") == 0)
arch = AUDIT_ARCH_PPC64;
else if (strcmp(optarg, "ppc64le") == 0)
arch = AUDIT_ARCH_PPC64LE;
- else if (strcmp(optarg, "ppc") == 0)
- arch = AUDIT_ARCH_PPC;
+ else if (strcmp(optarg, "s390") == 0)
+ arch = AUDIT_ARCH_S390;
+ else if (strcmp(optarg, "s390x") == 0)
+ arch = AUDIT_ARCH_S390X;
else
exit_fault(EINVAL);
break;
diff --git a/tools/util.c b/tools/util.c
index a52c865..5b21559 100644
--- a/tools/util.c
+++ b/tools/util.c
@@ -70,6 +70,10 @@
#endif
#elif __PPC__
#define ARCH_NATIVE AUDIT_ARCH_PPC
+#elif __s390x__ /* s390x must be checked before s390 */
+#define ARCH_NATIVE AUDIT_ARCH_S390X
+#elif __s390__
+#define ARCH_NATIVE AUDIT_ARCH_S390
#else
#error the simulator code needs to know about your machine type
#endif