mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu: only report errno in trace message on failure
Avoid reporting a stale errno value when the syscall succeeds, instead always pass 0. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
8dbc95cbd1
commit
9cf3c44ff5
@ -528,12 +528,12 @@ qemuMonitorIOWrite(qemuMonitorPtr mon)
|
||||
|
||||
PROBE(QEMU_MONITOR_IO_WRITE,
|
||||
"mon=%p buf=%s len=%zu ret=%d errno=%d",
|
||||
mon, buf, len, done, errno);
|
||||
mon, buf, len, done, done < 0 ? errno : 0);
|
||||
|
||||
if (mon->msg->txFD != -1) {
|
||||
PROBE(QEMU_MONITOR_IO_SEND_FD,
|
||||
"mon=%p fd=%d ret=%d errno=%d",
|
||||
mon, mon->msg->txFD, done, errno);
|
||||
mon, mon->msg->txFD, done, done < 0 ? errno : 0);
|
||||
}
|
||||
|
||||
if (done < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user