Fix xend XML generation when CPU pinning is used

This commit is contained in:
John Levon 2009-01-29 18:40:32 +00:00
parent 73da543e77
commit 3a8d93ab36
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu Jan 29 17:22:53 GMT 2009 John Levon <john.levon@sun.com>
* src/xend_internal.c: Fix xend XML generation when CPU pinning
is used
Thu Jan 29 19:05:00 +0100 2009 Jim Meyering <meyering@redhat.com>
maint: sync from coreutils

View File

@ -2226,11 +2226,21 @@ xenDaemonParseSxpr(virConnectPtr conn,
def->maxmem = def->memory;
if (cpus != NULL) {
def->cpumasklen = VIR_DOMAIN_CPUMASK_LEN;
if (VIR_ALLOC_N(def->cpumask, def->cpumasklen) < 0) {
virReportOOMError(conn);
goto error;
}
if (virDomainCpuSetParse(conn, &cpus,
0, def->cpumask,
def->cpumasklen) < 0)
def->cpumasklen) < 0) {
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("invalid CPU mask %s"), cpus);
goto error;
}
}
def->vcpus = sexpr_int(root, "domain/vcpus");
tmp = sexpr_node(root, "domain/on_poweroff");