On Thu, Jan 14, 2010 at 10:42:39AM -0700, Jim Fehlig wrote:
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 ....
--
ACK
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|