Re: [PATCH v2 06/10] Make qemu attach/detach functions public

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

 



On Sat, Jul 16, 2016 at 02:42:51AM +0200, Tomasz Flendrich wrote:
They will be used to test device attachment and detachment, so
they have to be visible to the outside.

---
src/qemu/qemu_driver.c |  4 ++--
src/qemu/qemu_driver.h | 14 ++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4a62e18..0671d24 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8065,7 +8065,7 @@ qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef,
    return 0;
}

-static int
+int
qemuDomainAttachDeviceLiveAndConfig(virConnectPtr conn,
                                    virDomainObjPtr vm,
                                    virQEMUDriverPtr driver,
@@ -8325,7 +8325,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
    return ret;
}

-static int
+int
qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
                                    virDomainObjPtr vm,
                                    const char *xml,
diff --git a/src/qemu/qemu_driver.h b/src/qemu/qemu_driver.h
index df7533a..3284933 100644
--- a/src/qemu/qemu_driver.h
+++ b/src/qemu/qemu_driver.h
@@ -24,6 +24,20 @@
#ifndef __QEMU_DRIVER_H__
# define __QEMU_DRIVER_H__

+# include "domain_conf.h"
+# include "qemu_conf.h"
+
int qemuRegister(void);

+int qemuDomainAttachDeviceLiveAndConfig(virConnectPtr conn,
+                                        virDomainObjPtr vm,
+                                        virQEMUDriverPtr driver,
+                                        const char *xml,
+                                        unsigned int flags);
+
+int qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
+                                        virDomainObjPtr vm,
+                                        const char *xml,
+                                        unsigned int flags);
+
#endif /* __QEMU_DRIVER_H__ */

This should not be exposed in qemu_driver.h, instead the functions
should be moved to qemu_domain.h if possible, but they now fit there.

If that's not possible, we need to do similar thing as we now have with
qemu_processpriv.h, so this could be called qemu_domainpriv.h I guess.

Attachment: signature.asc
Description: Digital signature

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