aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-01-02 14:35:12 -0700
committerEric Blake <eblake@redhat.com>2012-01-02 14:35:12 -0700
commit269ce467fc76dbd1a75c9e982d4cba1f0ba36fc2 (patch)
tree10574ef346b66480cdb93e8c4bf1593d6c1e6e01 /include
parentvirsh: Fix checking for reconnect conditions (diff)
downloadlibvirt-269ce467fc76dbd1a75c9e982d4cba1f0ba36fc2.tar.gz
libvirt-269ce467fc76dbd1a75c9e982d4cba1f0ba36fc2.tar.bz2
libvirt-269ce467fc76dbd1a75c9e982d4cba1f0ba36fc2.zip
domiftune: clean up previous patches
Most severe here is a latent (but currently untriggered) memory leak if any hypervisor ever adds a string interface property; the remainder are mainly cosmetic. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BANDWIDTH_*): Move macros closer to interface that uses them, and document type. * src/libvirt.c (virDomainSetInterfaceParameters) (virDomainGetInterfaceParameters): Formatting tweaks. * daemon/remote.c (remoteDispatchDomainGetInterfaceParameters): Avoid memory leak. * src/libvirt_public.syms (LIBVIRT_0.9.9): Sort lines. * src/libvirt_private.syms (domain_conf.h): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetInterfaceParameters): Fix comments, break long lines.
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in104
1 files changed, 57 insertions, 47 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index f59c3b17e..ad6fcced6 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -4,7 +4,7 @@
* Description: Provides the interfaces of the libvirt library to handle
* virtualized domains
*
- * Copy: Copyright (C) 2005-2006, 2010-2011 Red Hat, Inc.
+ * Copy: Copyright (C) 2005-2006, 2010-2012 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
@@ -645,48 +645,6 @@ typedef virTypedParameter *virTypedParameterPtr;
*/
#define VIR_DOMAIN_SCHEDULER_SHARES "shares"
-/**
- * VIR_DOMAIN_BANDWIDTH_IN_AVERAGE:
- *
- * Macro represents the inbound average of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_IN_AVERAGE "inbound.average"
-
-/**
- * VIR_DOMAIN_BANDWIDTH_IN_PEAK:
- *
- * Macro represents the inbound peak of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_IN_PEAK "inbound.peak"
-
-/**
- * VIR_DOMAIN_BANDWIDTH_IN_BURST:
- *
- * Macro represents the inbound burst of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_IN_BURST "inbound.burst"
-
-/**
- * VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE:
- *
- * Macro represents the outbound average of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE "outbound.average"
-
-/**
- * VIR_DOMAIN_BANDWIDTH_OUT_PEAK:
- *
- * Macro represents the outbound peak of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_OUT_PEAK "outbound.peak"
-
-/**
- * VIR_DOMAIN_BANDWIDTH_OUT_BURST:
- *
- * Macro represents the outbound burst of NIC bandwidth.
- */
-#define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst"
-
/*
* Fetch scheduler parameters, caller allocates 'params' field of size 'nparams'
*/
@@ -1488,6 +1446,51 @@ int virDomainInterfaceStats (virDomainPtr dom,
const char *path,
virDomainInterfaceStatsPtr stats,
size_t size);
+
+/* Management of interface parameters */
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_IN_AVERAGE:
+ *
+ * Macro represents the inbound average of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_IN_AVERAGE "inbound.average"
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_IN_PEAK:
+ *
+ * Macro represents the inbound peak of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_IN_PEAK "inbound.peak"
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_IN_BURST:
+ *
+ * Macro represents the inbound burst of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_IN_BURST "inbound.burst"
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE:
+ *
+ * Macro represents the outbound average of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE "outbound.average"
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_OUT_PEAK:
+ *
+ * Macro represents the outbound peak of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_OUT_PEAK "outbound.peak"
+
+/**
+ * VIR_DOMAIN_BANDWIDTH_OUT_BURST:
+ *
+ * Macro represents the outbound burst of NIC bandwidth, as a uint.
+ */
+#define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst"
+
int virDomainSetInterfaceParameters (virDomainPtr dom,
const char *device,
virTypedParameterPtr params,
@@ -1496,10 +1499,9 @@ int virDomainGetInterfaceParameters (virDomainPtr dom,
const char *device,
virTypedParameterPtr params,
int *nparams, unsigned int flags);
-int virDomainMemoryStats (virDomainPtr dom,
- virDomainMemoryStatPtr stats,
- unsigned int nr_stats,
- unsigned int flags);
+
+/* Management of domain block devices */
+
int virDomainBlockPeek (virDomainPtr dom,
const char *disk,
unsigned long long offset,
@@ -1546,7 +1548,15 @@ int virDomainGetBlockInfo(virDomainPtr dom,
virDomainBlockInfoPtr info,
unsigned int flags);
+/* Management of domain memory */
+
+int virDomainMemoryStats (virDomainPtr dom,
+ virDomainMemoryStatPtr stats,
+ unsigned int nr_stats,
+ unsigned int flags);
+
/* Memory peeking flags. */
+
typedef enum {
VIR_MEMORY_VIRTUAL = 1, /* addresses are virtual addresses */
VIR_MEMORY_PHYSICAL = 2, /* addresses are physical addresses */