Misc error reporting bugs in QEMU cli builder
A couple of places in the QEMU XML -> ARGV conversion code raised an error but then forgot to return an error status due to missing gotos. While fixing this also tweak style of a couple of other error reports Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
0eac9d1e90
commit
dca027a9b7
@ -8153,7 +8153,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
is to raise an error if present="yes" */
|
is to raise an error if present="yes" */
|
||||||
if (def->clock.timers[i]->present == 1) {
|
if (def->clock.timers[i]->present == 1) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
"%s", _("pit timer is not supported"));
|
"%s", _("hpet timer is not supported"));
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -8197,7 +8198,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
|
|
||||||
if (def->pm.s4) {
|
if (def->pm.s4) {
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISABLE_S4)) {
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISABLE_S4)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
"%s", _("setting ACPI S4 not supported"));
|
"%s", _("setting ACPI S4 not supported"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -8669,6 +8670,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
} else if (disk->src.type == VIR_STORAGE_TYPE_NETWORK) {
|
} else if (disk->src.type == VIR_STORAGE_TYPE_NETWORK) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("network disks are only supported with -drive"));
|
_("network disks are only supported with -drive"));
|
||||||
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
if (VIR_STRDUP(file, disk->src.path) < 0) {
|
if (VIR_STRDUP(file, disk->src.path) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
@ -10451,7 +10453,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
|
|||||||
_("invalid device name '%s'"), def->dst);
|
_("invalid device name '%s'"), def->dst);
|
||||||
virDomainDiskDefFree(def);
|
virDomainDiskDefFree(def);
|
||||||
def = NULL;
|
def = NULL;
|
||||||
/* fall through to "cleanup" */
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user