[PATCH 1/9] Remove dead code from qemuDomainAttachControllerDevice

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

 



We only support hotplugging SCSI controllers,
USB and virtio-serial related code is useless here.
---
 src/qemu/qemu_hotplug.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index aabdb78..8e38153 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -432,7 +432,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
     char *devstr = NULL;
     qemuDomainObjPrivatePtr priv = vm->privateData;
     bool releaseaddr = false;
-    bool addedToAddrSet = false;
 
     if (virDomainControllerFind(vm->def, controller->type, controller->idx) >= 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
@@ -463,20 +462,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
         if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, controller) < 0)
             goto cleanup;
 
-        if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
-            controller->model == -1 &&
-            !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("USB controller hotplug unsupported in this QEMU binary"));
-            goto cleanup;
-        }
-
-        if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL &&
-            virDomainVirtioSerialAddrSetAddController(priv->vioserialaddrs,
-                                                      controller) < 0)
-            goto cleanup;
-        addedToAddrSet = true;
-
         if (!(devstr = qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, NULL)))
             goto cleanup;
     }
@@ -505,9 +490,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
     }
 
  cleanup:
-    if (ret != 0 && addedToAddrSet)
-        virDomainVirtioSerialAddrSetRemoveController(priv->vioserialaddrs,
-                                                     controller);
     if (ret != 0 && releaseaddr)
         qemuDomainReleaseDeviceAddress(vm, &controller->info, NULL);
 
-- 
2.4.6

--
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]