On Fri, Mar 07, 2014 at 06:52:42PM +0800, Chunyan Liu wrote:
Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
src/qemu/qemu_hostdev.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 7f8f93c..e578519 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -1283,18 +1283,18 @@ qemuReattachPciDevice(virPCIDevicePtr dev, virHostdevManagerPtr
mgr)
virPCIDeviceFree(dev);
}
-
-void
-qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
- const char *name,
- virDomainHostdevDefPtr *hostdevs,
- int nhostdevs)
+/* @oldStateDir:
+ * For upgrade purpose: see virHostdevNetConfigRestore
+ */
+static void
+virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr,
+ const char *name,
+ virDomainHostdevDefPtr *hostdevs,
+ int nhostdevs,
+ char *oldStateDir)
{
virPCIDeviceListPtr pcidevs;
size_t i;
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
- char *oldStateDir = cfg->stateDir;
- virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
virObjectLock(hostdev_mgr->activePciHostdevs);
virObjectLock(hostdev_mgr->inactivePciHostdevs);
@@ -1369,6 +1369,21 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
cleanup:
virObjectUnlock(hostdev_mgr->activePciHostdevs);
virObjectUnlock(hostdev_mgr->inactivePciHostdevs);
+}
+
+void
+qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
+ const char *name,
+ virDomainHostdevDefPtr *hostdevs,
+ int nhostdevs)
+{
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
+ char *oldStateDir = cfg->stateDir;
This ought to be 'const' but thats a pre-existing bug :-)
ACK I'll fix that.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|