]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Introduce VIR_DOMAIN_LOADER_TYPE_NONE
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 25 Feb 2019 13:46:07 +0000 (14:46 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Mar 2019 14:29:44 +0000 (15:29 +0100)
commitd21f89cc1a84c759a8777f0026eb4144338fd8e4
treec023d7a799aac22318a5f2023f0a12bffb4c2afc
parentcdd592553a6948e200d8a86449d6cbe8fd004a35
conf: Introduce VIR_DOMAIN_LOADER_TYPE_NONE

This is going to extend virDomainLoader enum. The reason is that
once loader path is NULL its type makes no sense. However, since
value of zero corresponds to VIR_DOMAIN_LOADER_TYPE_ROM the
following XML would be produced:

  <os>
    <loader type='rom'/>
    ...
  </os>

To solve this, introduce VIR_DOMAIN_LOADER_TYPE_NONE which would
correspond to value of zero and then use post parse callback to
set the default loader type to 'rom' if needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/domaincapsschemadata/full.xml