When outputing the lxc.arch setting, use i686 instead of x86 since the
later is not a valid input to setarch, nor will the kernel output
UTS_MACHINE as x86. The kernel sets utsname.machine to i[3456]86, which
all map to PER_LINUX32.

Signed-off-by: Dwight Engen <[email protected]>
---
v2: use i686 instead of i386

 src/lxc/confile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 4e7dead..04bd03c 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -1807,7 +1807,7 @@ static int lxc_get_arch_entry(struct lxc_conf *c, char 
*retv, int inlen)
        int len = 0;
 
        switch(c->personality) {
-       case PER_LINUX32: strprint(retv, inlen, "x86"); break;
+       case PER_LINUX32: strprint(retv, inlen, "i686"); break;
        case PER_LINUX: strprint(retv, inlen, "x86_64"); break;
        default: break;
        }
@@ -2259,7 +2259,7 @@ void write_config(FILE *fout, struct lxc_conf *c)
                fprintf(fout, "lxc.stopsignal = SIG%s\n", 
sig_name(c->stopsignal));
        #if HAVE_SYS_PERSONALITY_H
        switch(c->personality) {
-       case PER_LINUX32: fprintf(fout, "lxc.arch = x86\n"); break;
+       case PER_LINUX32: fprintf(fout, "lxc.arch = i686\n"); break;
        case PER_LINUX: fprintf(fout, "lxc.arch = x86_64\n"); break;
        default: break;
        }
-- 
1.9.0

_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to