All callers now pass NULL/0 as arguments for vhostfd passing so we can
remove all the associated code.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 3 +--
src/qemu/qemu_monitor.c | 14 ++------------
src/qemu/qemu_monitor.h | 1 -
3 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 17fe072e02..f7d3b38a6a 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1461,7 +1461,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
if (qemuMonitorAddNetdev(priv->mon, &netprops,
tapfd, tapfdName, tapfdSize,
- NULL, NULL, 0,
slirpfd, slirpfdName) < 0) {
qemuDomainObjExitMonitor(vm);
virDomainAuditNet(vm, NULL, net, "attach", false);
@@ -2242,7 +2241,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver,
if (netdevprops) {
if (qemuMonitorAddNetdev(priv->mon, &netdevprops,
- NULL, NULL, 0, NULL, NULL, 0, -1, NULL) < 0)
+ NULL, NULL, 0, -1, NULL) < 0)
goto exit_monitor;
}
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 39004201c0..57a9e9af62 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2631,17 +2631,15 @@ int
qemuMonitorAddNetdev(qemuMonitor *mon,
virJSONValue **props,
int *tapfd, char **tapfdName, int tapfdSize,
- int *vhostfd, char **vhostfdName, int vhostfdSize,
int slirpfd, char *slirpfdName)
{
int ret = -1;
- size_t i = 0, j = 0;
+ size_t i = 0;
VIR_DEBUG("props=%p tapfd=%p tapfdName=%p tapfdSize=%d"
- "vhostfd=%p vhostfdName=%p vhostfdSize=%d"
"slirpfd=%d slirpfdName=%s",
props, tapfd, tapfdName, tapfdSize,
- vhostfd, vhostfdName, vhostfdSize, slirpfd, slirpfdName);
+ slirpfd, slirpfdName);
QEMU_CHECK_MONITOR(mon);
@@ -2649,10 +2647,6 @@ qemuMonitorAddNetdev(qemuMonitor *mon,
if (qemuMonitorSendFileHandle(mon, tapfdName[i], tapfd[i]) < 0)
goto cleanup;
}
- for (j = 0; j < vhostfdSize; j++) {
- if (qemuMonitorSendFileHandle(mon, vhostfdName[j], vhostfd[j]) < 0)
- goto cleanup;
- }
if (slirpfd > 0 &&
qemuMonitorSendFileHandle(mon, slirpfdName, slirpfd) < 0)
@@ -2666,10 +2660,6 @@ qemuMonitorAddNetdev(qemuMonitor *mon,
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
VIR_WARN("failed to close device handle '%s'",
tapfdName[i]);
}
- while (j--) {
- if (qemuMonitorCloseFileHandle(mon, vhostfdName[j]) < 0)
- VIR_WARN("failed to close device handle '%s'",
vhostfdName[j]);
- }
if (qemuMonitorCloseFileHandle(mon, slirpfdName) < 0)
VIR_WARN("failed to close device handle '%s'",
slirpfdName);
}
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 79d8486d08..1008b33671 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -984,7 +984,6 @@ int qemuMonitorCloseFileHandle(qemuMonitor *mon,
int qemuMonitorAddNetdev(qemuMonitor *mon,
virJSONValue **props,
int *tapfd, char **tapfdName, int tapfdSize,
- int *vhostfd, char **vhostfdName, int vhostfdSize,
int slirpfd, char *slirpfdName);
int qemuMonitorRemoveNetdev(qemuMonitor *mon,
--
2.35.1