[PATCH 4/4] qemuBuildHostNetStr: remove dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function is never called for VIR_DOMAIN_NET_TYPE_HOSTDEV,
and the dead code comment agrees.

Introduced by commit 1dcbef8a.
---
 src/qemu/qemu_command.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 19ee652..adeb906 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3722,11 +3722,6 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
         virBufferAsprintf(&buf, "user%c", type_sep);
         break;
 
-    case VIR_DOMAIN_NET_TYPE_HOSTDEV:
-        /* Should have been handled earlier via PCI/USB hotplug code. */
-        virObjectUnref(cfg);
-        return NULL;
-
     case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
         virBufferAsprintf(&buf, "vhost-user%cchardev=char%s,",
                           type_sep,
@@ -3736,6 +3731,8 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
                               net->driver.virtio.queues);
         break;
 
+    case VIR_DOMAIN_NET_TYPE_HOSTDEV:
+        /* Should have been handled earlier via PCI/USB hotplug code. */
     case VIR_DOMAIN_NET_TYPE_INTERNAL:
         /* Not supported by QEMU driver */
     case VIR_DOMAIN_NET_TYPE_LAST:
-- 
2.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]