[PATCH 04/10] Narrow down a parameter

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

 



This will make splitting up qemuDomainDetachDeviceFlags into two
functions easier.
---
 src/qemu/qemu_driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5be521f..d0d5021 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7476,9 +7476,8 @@ qemuDomainDetachDeviceControllerLive(virQEMUDriverPtr driver,
 static int
 qemuDomainDetachDeviceLive(virDomainObjPtr vm,
                            virDomainDeviceDefPtr dev,
-                           virDomainPtr dom)
+                           virQEMUDriverPtr driver)
 {
-    virQEMUDriverPtr driver = dom->conn->privateData;
     int ret = -1;
 
     switch ((virDomainDeviceType) dev->type) {
@@ -8402,7 +8401,7 @@ qemuDomainDetachDeviceFlags(virDomainPtr dom,
                                          VIR_DOMAIN_DEVICE_ACTION_DETACH) < 0)
             goto endjob;
 
-        if ((ret = qemuDomainDetachDeviceLive(vm, dev_copy, dom)) < 0)
+        if ((ret = qemuDomainDetachDeviceLive(vm, dev_copy, dom->conn->privateData)) < 0)
             goto endjob;
         /*
          * update domain status forcibly because the domain status may be
-- 
1.9.1

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