aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/0001-allow-all-iX86-strings-for-lxc.arch.patch
blob: 4c6f3b3400d0fba4568ee4eeeb2e63fec12b50d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From bb8d8207c36402ba1282081963b3dcd3356452ec Mon Sep 17 00:00:00 2001
From: Dwight Engen <dwight.engen@oracle.com>
Date: Mon, 28 Apr 2014 16:50:51 -0400
Subject: [PATCH] allow all iX86 strings for lxc.arch

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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 90fb344..4e7dead 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -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 },
 	};
-- 
1.9.3