提交 dca027a9 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 0eac9d1e
...@@ -8153,7 +8153,8 @@ qemuBuildCommandLine(virConnectPtr conn, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册