]>
iEval git - linux-seccomp.git/blob - libseccomp/tools/scmp_arch_detect.c
2 * Architecture Detector
4 * Copyright (c) 2013 Red Hat <pmoore@redhat.com>
5 * Author: Paul Moore <paul@paul-moore.com>
9 * This library is free software; you can redistribute it and/or modify it
10 * under the terms of version 2.1 of the GNU Lesser General Public License as
11 * published by the Free Software Foundation.
13 * This library is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; if not, see <http://www.gnu.org/licenses>.
30 * Print the usage information to stderr and exit
31 * @param program the name of the current program being invoked
33 * Print the usage information and exit with EINVAL.
36 static void exit_usage(const char *program
)
39 "usage: %s [-h] [-t]\n",
47 int main(int argc
, char *argv
[])
53 /* parse the command line */
54 while ((opt
= getopt(argc
, argv
, "ht")) > 0) {
61 /* usage information */
66 arch
= seccomp_arch_native();
72 case SCMP_ARCH_X86_64
:
81 case SCMP_ARCH_AARCH64
:
87 case SCMP_ARCH_MIPSEL
:
90 case SCMP_ARCH_MIPS64
:
93 case SCMP_ARCH_MIPSEL64
:
96 case SCMP_ARCH_MIPS64N32
:
97 printf("mips64n32\n");
99 case SCMP_ARCH_MIPSEL64N32
:
100 printf("mipsel64n32\n");
105 case SCMP_ARCH_PPC64
:
108 case SCMP_ARCH_PPC64LE
:
114 case SCMP_ARCH_S390X
:
121 printf("%d\n", arch
);
This page took 0.049249 seconds and 4 git commands to generate.