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

[libvirt] [PATCH 2/9] Public API



Definition of public API for virDomain{Attach,Detach}DeviceFlags.
---
 include/libvirt/libvirt.h.in |   13 +++++++++++++
 src/libvirt_public.syms      |    6 ++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index f192fb1..99a5c45 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -845,9 +845,22 @@ int                     virDomainGetVcpus       (virDomainPtr domain,
  */
 #define VIR_GET_CPUMAP(cpumaps,maplen,vcpu)     &(cpumaps[(vcpu)*(maplen)])
 
+
+typedef enum {
+
+   VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0, /* Modify device allocation based on current domain state */
+   VIR_DOMAIN_DEVICE_MODIFY_LIVE = (1 << 0), /* Modify live device allocation */
+   VIR_DOMAIN_DEVICE_MODIFY_CONFIG = (1 << 1), /* Modify persisted device allocation */
+} virDomainDeviceModifyFlags;
+
 int virDomainAttachDevice(virDomainPtr domain, const char *xml);
 int virDomainDetachDevice(virDomainPtr domain, const char *xml);
 
+int virDomainAttachDeviceFlags(virDomainPtr domain,
+                               const char *xml, unsigned int flags);
+int virDomainDetachDeviceFlags(virDomainPtr domain,
+                               const char *xml, unsigned int flags);
+
 /*
  * NUMA support
  */
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index 0521158..e190d83 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -349,4 +349,10 @@ LIBVIRT_0.7.5 {
         virDomainMemoryStats;
 } LIBVIRT_0.7.3;
 
+LIBVIRT_0.7.6 {
+    global:
+        virDomainAttachDeviceFlags;
+        virDomainDetachDeviceFlags;
+} LIBVIRT_0.7.5;
+
 # .... define new API here using predicted next version number ....
-- 
1.6.0.2


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