]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
allow all iX86 strings for lxc.arch
authorDwight Engen <dwight.engen@oracle.com>
Mon, 28 Apr 2014 20:50:51 +0000 (16:50 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 28 Apr 2014 21:17:58 +0000 (16:17 -0500)
This change accepts all the same strings for lxc.arch that setarch(8) does.

Note that we continue to parse plain x86 as PER_LINUX32 so as not to break
existing lxc configuration files.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/confile.c

index 90fb34400fdd923d0ca354b365c0091e918a71db..4e7dead7cfc44793a49d2a2e00bb99251d490bde 100644 (file)
@@ -1723,9 +1723,15 @@ signed long lxc_config_parse_arch(const char *arch)
        struct per_name {
                char *name;
                unsigned long per;
-       } pername[4] = {
+       } pername[] = {
                { "x86", PER_LINUX32 },
+               { "linux32", PER_LINUX32 },
+               { "i386", PER_LINUX32 },
+               { "i486", PER_LINUX32 },
+               { "i586", PER_LINUX32 },
                { "i686", PER_LINUX32 },
+               { "athlon", PER_LINUX32 },
+               { "linux64", PER_LINUX },
                { "x86_64", PER_LINUX },
                { "amd64", PER_LINUX },
        };