Commit 14622799 by Dwight Engen Committed by Serge Hallyn

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: 's avatarDwight Engen <dwight.engen@oracle.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent bb8d8207
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment