]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Set default emulator in domain_conf.*, rather than the driver.
authorCole Robinson <crobinso@redhat.com>
Tue, 16 Jun 2009 15:42:46 +0000 (15:42 +0000)
committerCole Robinson <crobinso@redhat.com>
Tue, 16 Jun 2009 15:42:46 +0000 (15:42 +0000)
commit53603043c7b573595eac398a50b61426f66d92f8
treefc20e01c72f0bce94218fdef10b1821faa8535fc
parent3f63c44d12315ce50b15bd014fece8a0dca5fdc0
Set default emulator in domain_conf.*, rather than the driver.

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:

http://www.redhat.com/archives/libvir-list/2008-October/msg00602.html
ChangeLog
src/domain_conf.c
src/domain_conf.h
src/libvirt_private.syms
src/lxc_driver.c
src/qemu_conf.c
src/qemu_driver.c