]> git.proxmox.com Git - mirror_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)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 19 Oct 2021 11:18:02 +0000 (13:18 +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 fafcc7ba947b3a2054abbcdb3c34e771472e7b61..e706092ee1665e0811c3d224cc2c0b6002b6e647 100644 (file)
@@ -3215,6 +3215,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)