SHA256
1
0
forked from pool/libvirt
libvirt/devflag-02.patch

51 lines
1.7 KiB
Diff
Raw Normal View History

commit 7269ec07ba4f298adab64ea66ac528ef66cf9ba0
Author: Jim Fehlig <jfehlig@novell.com>
Date: Wed Jan 13 18:29:16 2010 -0700
Public API
Definition of public API for virDomain{Attach,Detach}DeviceFlags.
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 ....