mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix error reporting for getfd + host_net_add in QEMU
If either of the getfd or host_net_add monitor commands return any text, this indicates an error condition. Don't ignore this! * src/qemu/qemu_monitor_text.c: Report errors for getfd and host_net_add
This commit is contained in:
parent
e699a82474
commit
9417eb0337
@ -1666,6 +1666,13 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (STRNEQ(reply, "")) {
|
||||||
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("unable to send TAP file handle: %s"),
|
||||||
|
reply);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -1725,11 +1732,16 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
if (qemuMonitorCommand(mon, cmd, &reply) < 0) {
|
if (qemuMonitorCommand(mon, cmd, &reply) < 0) {
|
||||||
qemuReportError(VIR_ERR_OPERATION_FAILED,
|
qemuReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
_("failed to close fd in qemu with '%s'"), cmd);
|
_("failed to add host net with '%s'"), cmd);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX error messages here ? */
|
if (STRNEQ(reply, "")) {
|
||||||
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("unable to add host net: %s"),
|
||||||
|
reply);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user