From: Mark McLoughlin Date: Mon, 7 Sep 2009 11:50:36 +0000 (+0100) Subject: Look up machine types from all domains in qemudGetOldMachines() X-Git-Tag: v0.7.1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5dd3bcde9ba3391652321b9e5f110c2c70bed23;p=thirdparty%2Flibvirt.git Look up machine types from all domains in qemudGetOldMachines() Rather than just looking at the default domain info, look at all domains * src/qemu_conf.c: look at all domains in qemudGetOldMachines() --- diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 882f9f9145..0d498c2ed6 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -554,12 +554,22 @@ qemudGetOldMachines(const char *ostype, for (i = 0; i < old_caps->nguests; i++) { virCapsGuestPtr guest = old_caps->guests[i]; + int j; if (!STREQ(ostype, guest->ostype) || !STREQ(arch, guest->arch.name) || wordsize != guest->arch.wordsize) continue; + for (j = 0; j < guest->arch.ndomains; j++) { + virCapsGuestDomainPtr dom = guest->arch.domains[j]; + + if (qemudGetOldMachinesFromInfo(&dom->info, + emulator, emulator_mtime, + machines, nmachines)) + return 1; + } + if (qemudGetOldMachinesFromInfo(&guest->arch.defaultInfo, emulator, emulator_mtime, machines, nmachines))