From 1462279962cb8708010a5ed5cbb0e043a610c71c Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Mon, 28 Apr 2014 16:51:06 -0400 Subject: [PATCH] output lxc.arch as i686 for PER_LINUX32 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 Signed-off-by: Serge Hallyn --- 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 4e7dead7c..04bd03c71 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; }