[PATCH v3 2/6] Make qemu attach/detach functions public

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

 



qemuDomainAttachDeviceLiveAndConfig and
qemuDomainDetachDeviceLiveAndConfig will be used to test device
attachment and detachment, so they have to be visible outside.
Because they are not a part of public interface of qemu driver,
a new header file is created: qemu_driverpriv.h, in a smilar
fashion to qemu_processpriv.h
---
 src/qemu/qemu_driver.c     |  5 +++--
 src/qemu/qemu_driverpriv.h | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 src/qemu/qemu_driverpriv.h

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6c3a413..f650766 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -44,6 +44,7 @@
 
 
 #include "qemu_driver.h"
+#include "qemu_driverpriv.h"
 #include "qemu_agent.h"
 #include "qemu_alias.h"
 #include "qemu_conf.h"
@@ -8065,7 +8066,7 @@ qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef,
     return 0;
 }
 
-static int
+int
 qemuDomainAttachDeviceLiveAndConfig(virConnectPtr conn,
                                     virDomainObjPtr vm,
                                     virQEMUDriverPtr driver,
@@ -8343,7 +8344,7 @@ qemuDomainUpdateDeviceFlags(virDomainPtr dom,
     return ret;
 }
 
-static int
+int
 qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
                                     virDomainObjPtr vm,
                                     const char *xml,
diff --git a/src/qemu/qemu_driverpriv.h b/src/qemu/qemu_driverpriv.h
new file mode 100644
index 0000000..943f0da
--- /dev/null
+++ b/src/qemu/qemu_driverpriv.h
@@ -0,0 +1,40 @@
+/*
+ * qemu_driverpriv.h: private declarations for managing qemu guests
+ *
+ * Copyright (C) 2016 Tomasz Flendrich
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Tomasz Flendrich
+ */
+
+#ifndef __QEMU_DRIVERPRIV_H__
+# define __QEMU_DRIVERPRIV_H__
+
+# include "domain_conf.h"
+# include "qemu_conf.h"
+
+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_DRIVERPRIV_H__ */
-- 
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]