render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
0a7476
From c03d9e5f2d848a185ec262d0197d4d8dfb1f7f0e Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <c03d9e5f2d848a185ec262d0197d4d8dfb1f7f0e@dist-git>
0a7476
From: Laine Stump <laine@laine.org>
0a7476
Date: Thu, 11 Apr 2019 15:14:44 -0400
0a7476
Subject: [PATCH] qemu_hotplug: make Detach functions called only from
0a7476
 qemu_hotplug.c static
0a7476
0a7476
These are no longer called from qemu_driver.c, since the function that
0a7476
called them (qemuDomainDetachDeviceLive()) has been moved to
0a7476
qemu_hotplug.c, and they are no longer called from testqemuhotplug.c
0a7476
because it now just called qemuDomainDetachDeviceLive() instead of all
0a7476
the subordinate functions.
0a7476
0a7476
Signed-off-by: Laine Stump <laine@laine.org>
0a7476
ACKed-by: Peter Krempa <pkrempa@redhat.com>
0a7476
(cherry picked from commit 637d72f985e2700e88c3b3a4d4a83df9b8d6d35d)
0a7476
0a7476
Conflicts:
0a7476
  src/qemu/qemu_hotplug.h - sentinel protecting from multiple inclusion
0a7476
                            was renamed upstream, leading to difference
0a7476
                            in context (but not in the lines that were
0a7476
                            changed)
0a7476
0a7476
Partially-Resolves: https://bugzilla.redhat.com/1658198
0a7476
Signed-off-by: Laine Stump <laine@redhat.com>
0a7476
Signed-off-by: Laine Stump <laine@laine.org>
0a7476
Message-Id: <20190411191453.24055-33-laine@redhat.com>
0a7476
Acked-by: Michal Privoznik <mprivozn@redhat.com>
0a7476
---
0a7476
 src/qemu/qemu_hotplug.c | 47 +++++++++++++++++++------------------
0a7476
 src/qemu/qemu_hotplug.h | 51 -----------------------------------------
0a7476
 2 files changed, 25 insertions(+), 73 deletions(-)
0a7476
0a7476
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
0a7476
index fd78f4ca01..b0f45708ae 100644
0a7476
--- a/src/qemu/qemu_hotplug.c
0a7476
+++ b/src/qemu/qemu_hotplug.c
0a7476
@@ -4837,7 +4837,7 @@ qemuFindDisk(virDomainDefPtr def, const char *dst)
0a7476
     return -1;
0a7476
 }
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
0a7476
                                virDomainObjPtr vm,
0a7476
                                virDomainDeviceDefPtr dev,
0a7476
@@ -4988,10 +4988,11 @@ static bool qemuDomainControllerIsBusy(virDomainObjPtr vm,
0a7476
     }
0a7476
 }
0a7476
 
0a7476
-int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
0a7476
-                                     virDomainObjPtr vm,
0a7476
-                                     virDomainDeviceDefPtr dev,
0a7476
-                                     bool async)
0a7476
+static int
0a7476
+qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
0a7476
+                                 virDomainObjPtr vm,
0a7476
+                                 virDomainDeviceDefPtr dev,
0a7476
+                                 bool async)
0a7476
 {
0a7476
     int idx, ret = -1;
0a7476
     virDomainControllerDefPtr detach = NULL;
0a7476
@@ -5049,10 +5050,11 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
0a7476
 
0a7476
 
0a7476
 /* search for a hostdev matching dev and detach it */
0a7476
-int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
0a7476
-                               virDomainObjPtr vm,
0a7476
-                               virDomainDeviceDefPtr dev,
0a7476
-                               bool async)
0a7476
+static int
0a7476
+qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
0a7476
+                           virDomainObjPtr vm,
0a7476
+                           virDomainDeviceDefPtr dev,
0a7476
+                           bool async)
0a7476
 {
0a7476
     virDomainHostdevDefPtr hostdev = dev->data.hostdev;
0a7476
     virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys;
0a7476
@@ -5164,7 +5166,7 @@ int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
0a7476
                             virDomainObjPtr vm,
0a7476
                             virDomainShmemDefPtr dev,
0a7476
@@ -5218,7 +5220,7 @@ qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
0a7476
                          virDomainObjPtr vm,
0a7476
                          virDomainWatchdogDefPtr dev,
0a7476
@@ -5273,7 +5275,7 @@ qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
0a7476
                                virDomainObjPtr vm,
0a7476
                                virDomainRedirdevDefPtr dev,
0a7476
@@ -5317,7 +5319,7 @@ qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
0a7476
                           virDomainObjPtr vm,
0a7476
                           virDomainDeviceDefPtr dev,
0a7476
@@ -5383,10 +5385,11 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
0a7476
-                              virDomainObjPtr vm,
0a7476
-                              virDomainChrDefPtr chr,
0a7476
-                              bool async)
0a7476
+static int
0a7476
+qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
0a7476
+                          virDomainObjPtr vm,
0a7476
+                          virDomainChrDefPtr chr,
0a7476
+                          bool async)
0a7476
 {
0a7476
     int ret = -1;
0a7476
     qemuDomainObjPrivatePtr priv = vm->privateData;
0a7476
@@ -5440,7 +5443,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
0a7476
                           virDomainObjPtr vm,
0a7476
                           virDomainRNGDefPtr rng,
0a7476
@@ -5486,7 +5489,7 @@ qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
0a7476
                              virDomainObjPtr vm,
0a7476
                              virDomainMemoryDefPtr memdef,
0a7476
@@ -5534,7 +5537,7 @@ qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachInputDevice(virDomainObjPtr vm,
0a7476
                             virDomainInputDefPtr def,
0a7476
                             bool async)
0a7476
@@ -5585,7 +5588,7 @@ qemuDomainDetachInputDevice(virDomainObjPtr vm,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachVsockDevice(virDomainObjPtr vm,
0a7476
                             virDomainVsockDefPtr dev,
0a7476
                             bool async)
0a7476
@@ -5621,7 +5624,7 @@ qemuDomainDetachVsockDevice(virDomainObjPtr vm,
0a7476
 }
0a7476
 
0a7476
 
0a7476
-int
0a7476
+static int
0a7476
 qemuDomainDetachLease(virQEMUDriverPtr driver,
0a7476
                       virDomainObjPtr vm,
0a7476
                       virDomainLeaseDefPtr lease)
0a7476
diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h
0a7476
index 30b6fcc074..e8e4934db8 100644
0a7476
--- a/src/qemu/qemu_hotplug.h
0a7476
+++ b/src/qemu/qemu_hotplug.h
0a7476
@@ -81,10 +81,6 @@ int qemuDomainFindGraphicsIndex(virDomainDefPtr def,
0a7476
 int qemuDomainAttachMemory(virQEMUDriverPtr driver,
0a7476
                            virDomainObjPtr vm,
0a7476
                            virDomainMemoryDefPtr mem);
0a7476
-int qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
0a7476
-                                 virDomainObjPtr vm,
0a7476
-                                 virDomainMemoryDefPtr memdef,
0a7476
-                                 bool async);
0a7476
 int qemuDomainChangeGraphics(virQEMUDriverPtr driver,
0a7476
                              virDomainObjPtr vm,
0a7476
                              virDomainGraphicsDefPtr dev);
0a7476
@@ -101,35 +97,6 @@ int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
0a7476
                                  virDomainObjPtr vm,
0a7476
                                  virDomainNetDefPtr dev,
0a7476
                                  int linkstate);
0a7476
-int qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
0a7476
-                                   virDomainObjPtr vm,
0a7476
-                                   virDomainDeviceDefPtr dev,
0a7476
-                                   bool async);
0a7476
-int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
0a7476
-                                     virDomainObjPtr vm,
0a7476
-                                     virDomainDeviceDefPtr dev,
0a7476
-                                     bool async);
0a7476
-int qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
0a7476
-                              virDomainObjPtr vm,
0a7476
-                              virDomainDeviceDefPtr dev,
0a7476
-                              bool async);
0a7476
-int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
0a7476
-                               virDomainObjPtr vm,
0a7476
-                               virDomainDeviceDefPtr dev,
0a7476
-                               bool async);
0a7476
-int qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
0a7476
-                                virDomainObjPtr vm,
0a7476
-                                virDomainShmemDefPtr dev,
0a7476
-                                bool async);
0a7476
-int qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
0a7476
-                             virDomainObjPtr vm,
0a7476
-                             virDomainWatchdogDefPtr watchdog,
0a7476
-                             bool async);
0a7476
-
0a7476
-int qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
0a7476
-                                   virDomainObjPtr vm,
0a7476
-                                   virDomainRedirdevDefPtr dev,
0a7476
-                                   bool async);
0a7476
 
0a7476
 int qemuDomainAttachInputDevice(virQEMUDriverPtr driver,
0a7476
                                 virDomainObjPtr vm,
0a7476
@@ -142,23 +109,12 @@ int qemuDomainAttachVsockDevice(virQEMUDriverPtr driver,
0a7476
 int qemuDomainAttachLease(virQEMUDriverPtr driver,
0a7476
                           virDomainObjPtr vm,
0a7476
                           virDomainLeaseDefPtr lease);
0a7476
-int qemuDomainDetachLease(virQEMUDriverPtr driver,
0a7476
-                          virDomainObjPtr vm,
0a7476
-                          virDomainLeaseDefPtr lease);
0a7476
 int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
0a7476
                               virDomainObjPtr vm,
0a7476
                               virDomainChrDefPtr chr);
0a7476
-int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
0a7476
-                              virDomainObjPtr vm,
0a7476
-                              virDomainChrDefPtr chr,
0a7476
-                              bool async);
0a7476
 int qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
0a7476
                               virDomainObjPtr vm,
0a7476
                               virDomainRNGDefPtr rng);
0a7476
-int qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
0a7476
-                              virDomainObjPtr vm,
0a7476
-                              virDomainRNGDefPtr rng,
0a7476
-                              bool async);
0a7476
 
0a7476
 int qemuDomainDetachDeviceLive(virDomainObjPtr vm,
0a7476
                                virDomainDeviceDefPtr dev,
0a7476
@@ -198,11 +154,4 @@ int qemuDomainSetVcpuInternal(virQEMUDriverPtr driver,
0a7476
                               virBitmapPtr vcpus,
0a7476
                               bool state);
0a7476
 
0a7476
-int qemuDomainDetachInputDevice(virDomainObjPtr vm,
0a7476
-                                virDomainInputDefPtr def,
0a7476
-                                bool async);
0a7476
-
0a7476
-int qemuDomainDetachVsockDevice(virDomainObjPtr vm,
0a7476
-                                virDomainVsockDefPtr dev,
0a7476
-                                bool async);
0a7476
 #endif /* __QEMU_HOTPLUG_H__ */
0a7476
-- 
0a7476
2.21.0
0a7476