From a605594f8e2feaa77474008212a31a8dd21b03b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 19 Oct 2012 00:29:17 +0200 Subject: [PATCH] qemu: Don't fail without emulatorpin or cpumask This unbreaks qemu:///session that got broken by ba63d8f7d843461f77a8206c1ef9da38388713e5. --- src/qemu/qemu_process.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e08ec6757f..d3951d1326 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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: