[libvirt] [PATCH] Set default emulator in domain_conf.*, rather than the driver.
Daniel Veillard
veillard at redhat.com
Tue Jun 16 09:46:32 UTC 2009
On Mon, Jun 15, 2009 at 06:11:07PM -0400, Cole Robinson wrote:
> Rather than numerous instances of:
>
> emulator = vm->def->emulator;
> if (!emulator)
> emulator = virDomainDefDefaultEmulator(conn, vm->def, driver->caps);
> if (!emulator)
> return -1;
>
> Set this value at XML parse time in the domain config, so we can depend on
> it for all future emulator accesses. There were unchecked accesses in the
> qemu driver that were tripping up on this if no emulator was specified in
> the XML, see:
Okay, I had to convince myself that we were not leaking the emulator
string in the end, but that looks fine. ACK
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list