qemu: Don't fail without emulatorpin or cpumask

This unbreaks qemu:///session that got broken by
ba63d8f7d8.
This commit is contained in:
Guido Günther 2012-10-19 00:29:17 +02:00
parent b7e9202401
commit a605594f8e
1 changed files with 5 additions and 3 deletions

View File

@ -2037,12 +2037,14 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn,
if (virNodeGetInfo(conn, &nodeinfo) != 0)
return -1;
if (def->cputune.emulatorpin)
if (def->cputune.emulatorpin) {
cpumask = def->cputune.emulatorpin->cpumask;
else if (def->cpumask)
} else if (def->cpumask) {
cpumask = def->cpumask;
else
} else {
ret = 0;
goto cleanup;
}
ret = virProcessInfoSetAffinity(vm->pid, cpumask);
cleanup: