]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: get_hostarch()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 24 May 2018 14:24:59 +0000 (16:24 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 24 May 2018 15:45:56 +0000 (17:45 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/seccomp.c

index 8a418a66e8c7cacf2daeda113a86900b52d88f16..3a1cacb634882cae30653d6d33b697d14d616e4c 100644 (file)
@@ -309,6 +309,7 @@ int get_hostarch(void)
                SYSERROR("Failed to read host arch");
                return -1;
        }
+
        if (strcmp(uts.machine, "i686") == 0)
                return lxc_seccomp_arch_i386;
        /* no x32 kernels */
@@ -330,6 +331,7 @@ int get_hostarch(void)
                return MIPS_ARCH_O32;
        else if (strncmp(uts.machine, "s390x", 5) == 0)
                return lxc_seccomp_arch_s390x;
+
        return lxc_seccomp_arch_unknown;
 }