mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
qemu: Move validation check out of postparse
Suggested-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e493a2ed73
commit
f099d3fe10
@ -4474,12 +4474,6 @@ qemuDomainDefBootPostParse(virDomainDef *def,
|
|||||||
{
|
{
|
||||||
bool abiUpdate = !!(parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE);
|
bool abiUpdate = !!(parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE);
|
||||||
|
|
||||||
if (def->os.bootloader || def->os.bootloaderArgs) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("bootloader is not supported by QEMU"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Firmware selection can fail for a number of reasons, but the
|
/* Firmware selection can fail for a number of reasons, but the
|
||||||
* most likely one is that the requested configuration contains
|
* most likely one is that the requested configuration contains
|
||||||
* mistakes or includes constraints that are impossible to
|
* mistakes or includes constraints that are impossible to
|
||||||
|
@ -766,6 +766,12 @@ static int
|
|||||||
qemuValidateDomainDefBoot(const virDomainDef *def,
|
qemuValidateDomainDefBoot(const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
|
if (def->os.bootloader || def->os.bootloaderArgs) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("bootloader is not supported by QEMU"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (def->os.loader) {
|
if (def->os.loader) {
|
||||||
if (def->os.loader->secure == VIR_TRISTATE_BOOL_YES) {
|
if (def->os.loader->secure == VIR_TRISTATE_BOOL_YES) {
|
||||||
/* These are the QEMU implementation limitations. But we
|
/* These are the QEMU implementation limitations. But we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user