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

[libvirt] [PATCH 06/13] Drop qemudAttachPciDiskDevice



From: Wolfgang Mauerer <wolfgang mauerer siemens com>

This function is not necessary anymore

Signed-off-by: Wolfgang Mauerer <wolfgang mauerer siemens com>
Signed-off-by: Jan Kiszka <jan kiszka siemens com>
---
 src/qemu/qemu_driver.c |   33 ---------------------------------
 1 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9f71562..1fbfdde 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4597,39 +4597,6 @@ try_command:
     return 0;
 }
 
-static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
-                                          virDomainObjPtr vm,
-                                          virDomainDeviceDefPtr dev)
-{
-    int i;
-    const char* type = virDomainDiskBusTypeToString(dev->data.disk->bus);
-
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
-        if (STREQ(vm->def->disks[i]->dst, dev->data.disk->dst)) {
-            qemudReportError(conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
-                           _("target %s already exists"), dev->data.disk->dst);
-            return -1;
-        }
-    }
-
-    if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks+1) < 0) {
-        virReportOOMError(conn);
-        return -1;
-    }
-
-    if (qemuMonitorAddPCIDisk(vm,
-                              dev->data.disk->src,
-                              type,
-                              &dev->data.disk->pci_addr.domain,
-                              &dev->data.disk->pci_addr.bus,
-                              &dev->data.disk->pci_addr.slot) < 0)
-        return -1;
-
-    virDomainDiskInsertPreAlloced(vm->def, dev->data.disk);
-
-    return 0;
-}
-
 static int qemudDomainAttachUsbMassstorageDevice(virConnectPtr conn,
                                                  virDomainObjPtr vm,
                                                  virDomainDeviceDefPtr dev)
-- 
1.6.4


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