]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Add riscv64 to --arch parameter values
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 19 Oct 2021 07:56:21 +0000 (09:56 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 19 Oct 2021 15:14:17 +0000 (17:14 +0200)
lxc-attach uses an --arch parameter. 'riscv64' should be a usable value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
config/bash/lxc.in
src/lxc/confile.c
src/tests/arch_parse.c

index dd9770425790c8b2b4f2c3b9cc981d6c667d20df..6672bf02d99b9367f7fa77edcb6235ac447b3bab 100644 (file)
@@ -285,7 +285,7 @@ _lxc_attach() {
             ;;
         --arch | -a )
             # https://github.com/lxc/lxc/blob/stable-4.0/src/tests/arch_parse.c#L37
-            COMPREPLY=( $( compgen -W 'arm armel armhf armv7l athlon i386 i486 i586 i686 linux32 mips mipsel ppc powerpc x86 aarch64 amd64 arm64 linux64 mips64 mips64el ppc64 ppc64el ppc64le powerpc64 s390x x86_64' -- "${cur}" ) )
+            COMPREPLY=( $( compgen -W 'arm armel armhf armv7l athlon i386 i486 i586 i686 linux32 mips mipsel ppc powerpc x86 aarch64 amd64 arm64 linux64 mips64 mips64el ppc64 ppc64el ppc64le powerpc64 riscv64 s390x x86_64' -- "${cur}" ) )
             return
             ;;
         --elevated-privileges | -e )
index 2d20a72ef2b6add3b012216e788002a2225d4ce6..213688060dc4d5d9334265fab4f9b1f61d753584 100644 (file)
@@ -2993,6 +2993,7 @@ int lxc_config_parse_arch(const char *arch, signed long *persona)
                { "ppc64el",   PER_LINUX   },
                { "ppc64le",   PER_LINUX   },
                { "powerpc64", PER_LINUX   },
+               { "riscv64",   PER_LINUX   },
                { "s390x",     PER_LINUX   },
                { "x86_64",    PER_LINUX   },
        };
index f8a0a46d27c6b1b7c30c630158efdd242259bbfd..38ec972d34179192111dabc89780e8817e555fe9 100644 (file)
@@ -38,7 +38,7 @@ static const char *const arches[] = {
     "arm",   "armel",  "armhf",   "armv7l",    "athlon",  "i386",   "i486",
     "i586",  "i686",   "linux32", "mips",      "mipsel",  "ppc",    "powerpc",
     "x86",   "aarch64", "amd64",   "arm64",    "linux64", "mips64", "mips64el",
-    "ppc64", "ppc64el", "ppc64le", "powerpc64", "s390x",   "x86_64",
+    "ppc64", "ppc64el", "ppc64le", "powerpc64", "riscv64", "s390x",  "x86_64",
 };
 
 static bool parse_valid_architectures(void)