mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemuMonitorAddNetdev: Remove unneeded 'slirp' variables and useless debug
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@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
08b0ac6683
commit
485a336f5d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user