Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_command.c | 7 ++++--- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_slirp.c | 4 +--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bab2b0a99b..90a4b98e1e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4325,7 +4325,7 @@ qemuBuildHostNetProps(virDomainNetDef *net) if (netpriv->slirpfd) { if (virJSONValueObjectAdd(&netprops, "s:type", "socket", - "s:fd", qemuFDPassGetPath(netpriv->slirpfd), + "s:fd", qemuFDPassDirectGetPath(netpriv->slirpfd), NULL) < 0) return NULL; } else { @@ -8914,8 +8914,9 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver, for (n = netpriv->vhostfds; n; n = n->next) qemuFDPassDirectTransferCommand(n->data, cmd); - if (qemuFDPassTransferCommand(netpriv->slirpfd, cmd) < 0 || - qemuFDPassTransferCommand(netpriv->vdpafd, cmd) < 0) + qemuFDPassDirectTransferCommand(netpriv->slirpfd, cmd); + + if (qemuFDPassTransferCommand(netpriv->vdpafd, cmd) < 0) return -1; if (!(hostnetprops = qemuBuildHostNetProps(net))) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f83ee55246..c957b5296a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1051,7 +1051,7 @@ qemuDomainNetworkPrivateClearFDs(qemuDomainNetworkPrivate *priv) if (!priv) return; - g_clear_pointer(&priv->slirpfd, qemuFDPassFree); + g_clear_pointer(&priv->slirpfd, qemuFDPassDirectFree); g_clear_pointer(&priv->vdpafd, qemuFDPassFree); g_slist_free_full(g_steal_pointer(&priv->vhostfds), (GDestroyNotify) qemuFDPassDirectFree); g_slist_free_full(g_steal_pointer(&priv->tapfds), (GDestroyNotify) qemuFDPassDirectFree); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 521df8ca01..1547dec668 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -403,7 +403,7 @@ struct _qemuDomainNetworkPrivate { qemuSlirp *slirp; /* file descriptor transfer helpers */ - qemuFDPass *slirpfd; + qemuFDPassDirect *slirpfd; GSList *tapfds; /* qemuFDPassDirect */ GSList *vhostfds; /* qemuFDPassDirect */ qemuFDPass *vdpafd; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4ebb3c5818..3504cd21ff 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1386,7 +1386,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, } } - if (qemuFDPassTransferMonitor(netpriv->slirpfd, priv->mon) < 0 || + if (qemuFDPassDirectTransferMonitor(netpriv->slirpfd, priv->mon) < 0 || qemuFDPassTransferMonitor(netpriv->vdpafd, priv->mon) < 0) { qemuDomainObjExitMonitor(vm); goto cleanup; diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 618947b6c1..772ea582c5 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@ -352,9 +352,7 @@ qemuSlirpStart(virDomainObj *vm, slirp->pid = pid; - netpriv->slirpfd = qemuFDPassNewDirect(fdname, priv); - - qemuFDPassAddFD(netpriv->slirpfd, &slirp->fd[0], NULL); + netpriv->slirpfd = qemuFDPassDirectNew(fdname, &slirp->fd[0]); return 0; -- 2.35.3