None of the callers now uses the slirp fd passing feature, so it can be removed. At this point even the VIR_DEBUG doesn't make sense as it would only log the pointer of 'props'. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 6 ++---- src/qemu/qemu_monitor.c | 23 ++--------------------- src/qemu/qemu_monitor.h | 3 +-- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0f3b1f4bc4..cae7b0dd3b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1401,8 +1401,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, charDevPlugged = true; } - if (qemuMonitorAddNetdev(priv->mon, &netprops, - -1, NULL) < 0) { + if (qemuMonitorAddNetdev(priv->mon, &netprops) < 0) { qemuDomainObjExitMonitor(vm); virDomainAuditNet(vm, NULL, net, "attach", false); goto try_remove; @@ -2170,8 +2169,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver, chardevAttached = true; if (netdevprops) { - if (qemuMonitorAddNetdev(priv->mon, &netdevprops, - -1, NULL) < 0) + if (qemuMonitorAddNetdev(priv->mon, &netdevprops) < 0) goto exit_monitor; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a71311d0c4..d44c7f0c60 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2629,31 +2629,12 @@ qemuMonitorCloseFileHandle(qemuMonitor *mon, int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props, - int slirpfd, char *slirpfdName) + virJSONValue **props) { - int ret = -1; - - VIR_DEBUG("props=%p " - "slirpfd=%d slirpfdName=%s", - props, - slirpfd, slirpfdName); QEMU_CHECK_MONITOR(mon); - if (slirpfd > 0 && - qemuMonitorSendFileHandle(mon, slirpfdName, slirpfd) < 0) - goto cleanup; - - ret = qemuMonitorJSONAddNetdev(mon, props); - - cleanup: - if (ret < 0) { - if (qemuMonitorCloseFileHandle(mon, slirpfdName) < 0) - VIR_WARN("failed to close device handle '%s'", slirpfdName); - } - - return ret; + return qemuMonitorJSONAddNetdev(mon, props); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index a49ef180c1..b1484fdff8 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -982,8 +982,7 @@ int qemuMonitorCloseFileHandle(qemuMonitor *mon, const char *fdname); int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props, - int slirpfd, char *slirpfdName); + virJSONValue **props); int qemuMonitorRemoveNetdev(qemuMonitor *mon, const char *alias); -- 2.35.1