[PATCH] docs: fix documentation of enum constants

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

 



The documentation string has to follow the definition of a constant in
the enum. Otherwise, the HTML documentation will be generated
incorrectly.

Signed-off-by: Tomáš Golembiovský <tgolembi@xxxxxxxxxx>
---
 include/libvirt/libvirt-domain.h | 62 ++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 45f939a8c..2f3162d0f 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -583,56 +583,56 @@ typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
  * Memory Statistics Tags:
  */
 typedef enum {
-    /* The total amount of data read from swap space (in kB). */
     VIR_DOMAIN_MEMORY_STAT_SWAP_IN         = 0,
-    /* The total amount of memory written out to swap space (in kB). */
+    /* The total amount of data read from swap space (in kB). */
     VIR_DOMAIN_MEMORY_STAT_SWAP_OUT        = 1,
+    /* The total amount of memory written out to swap space (in kB). */
 
+    VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT     = 2,
+    VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT     = 3,
     /*
      * Page faults occur when a process makes a valid access to virtual memory
      * that is not available.  When servicing the page fault, if disk IO is
      * required, it is considered a major fault.  If not, it is a minor fault.
      * These are expressed as the number of faults that have occurred.
      */
-    VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT     = 2,
-    VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT     = 3,
 
+    VIR_DOMAIN_MEMORY_STAT_UNUSED          = 4,
     /*
      * The amount of memory left completely unused by the system.  Memory that
      * is available but used for reclaimable caches should NOT be reported as
      * free.  This value is expressed in kB.
      */
-    VIR_DOMAIN_MEMORY_STAT_UNUSED          = 4,
 
+    VIR_DOMAIN_MEMORY_STAT_AVAILABLE       = 5,
     /*
      * The total amount of usable memory as seen by the domain.  This value
      * may be less than the amount of memory assigned to the domain if a
      * balloon driver is in use or if the guest OS does not initialize all
      * assigned pages.  This value is expressed in kB.
      */
-    VIR_DOMAIN_MEMORY_STAT_AVAILABLE       = 5,
 
-    /* Current balloon value (in KB). */
     VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON  = 6,
+    /* Current balloon value (in KB). */
 
+    VIR_DOMAIN_MEMORY_STAT_RSS             = 7,
     /* Resident Set Size of the process running the domain. This value
      * is in kB */
-    VIR_DOMAIN_MEMORY_STAT_RSS             = 7,
 
+    VIR_DOMAIN_MEMORY_STAT_USABLE          = 8,
     /*
      * How much the balloon can be inflated without pushing the guest system
      * to swap, corresponds to 'Available' in /proc/meminfo
      */
-    VIR_DOMAIN_MEMORY_STAT_USABLE          = 8,
 
-    /* Timestamp of the last update of statistics, in seconds. */
     VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE     = 9,
+    /* Timestamp of the last update of statistics, in seconds. */
 
+    VIR_DOMAIN_MEMORY_STAT_NR              = 10,
     /*
      * The number of statistics supported by this version of the interface.
      * To add new statistics, add them to the enum and increase this value.
      */
-    VIR_DOMAIN_MEMORY_STAT_NR              = 10,
 
 # ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_MEMORY_STAT_LAST = VIR_DOMAIN_MEMORY_STAT_NR
@@ -683,22 +683,23 @@ typedef enum {
 
 /* Domain migration flags. */
 typedef enum {
+    VIR_MIGRATE_LIVE              = (1 << 0),
     /* Do not pause the domain during migration. The domain's memory will
      * be transferred to the destination host while the domain is running.
      * The migration may never converge if the domain is changing its memory
      * faster then it can be transferred. The domain can be manually paused
      * anytime during migration using virDomainSuspend.
      */
-    VIR_MIGRATE_LIVE              = (1 << 0),
 
+    VIR_MIGRATE_PEER2PEER         = (1 << 1),
     /* Tell the source libvirtd to connect directly to the destination host.
      * Without this flag the client (e.g., virsh) connects to both hosts and
      * controls the migration process. In peer-to-peer mode, the source
      * libvirtd controls the migration by calling the destination daemon
      * directly.
      */
-    VIR_MIGRATE_PEER2PEER         = (1 << 1),
 
+    VIR_MIGRATE_TUNNELLED         = (1 << 2),
     /* Tunnel migration data over libvirtd connection. Without this flag the
      * source hypervisor sends migration data directly to the destination
      * hypervisor. This flag can only be used when VIR_MIGRATE_PEER2PEER is
@@ -707,26 +708,26 @@ typedef enum {
      * Note the less-common spelling that we're stuck with:
      * VIR_MIGRATE_TUNNELLED should be VIR_MIGRATE_TUNNELED.
      */
-    VIR_MIGRATE_TUNNELLED         = (1 << 2),
 
+    VIR_MIGRATE_PERSIST_DEST      = (1 << 3),
     /* Define the domain as persistent on the destination host after successful
      * migration. If the domain was persistent on the source host and
      * VIR_MIGRATE_UNDEFINE_SOURCE is not used, it will end up persistent on
      * both hosts.
      */
-    VIR_MIGRATE_PERSIST_DEST      = (1 << 3),
 
+    VIR_MIGRATE_UNDEFINE_SOURCE   = (1 << 4),
     /* Undefine the domain on the source host once migration successfully
      * finishes.
      */
-    VIR_MIGRATE_UNDEFINE_SOURCE   = (1 << 4),
 
+    VIR_MIGRATE_PAUSED            = (1 << 5),
     /* Leave the domain suspended on the destination host. virDomainResume (on
      * the virDomainPtr returned by the migration API) has to be called
      * explicitly to resume domain's virtual CPUs.
      */
-    VIR_MIGRATE_PAUSED            = (1 << 5),
 
+    VIR_MIGRATE_NON_SHARED_DISK   = (1 << 6),
     /* Migrate full disk images in addition to domain's memory. By default
      * only non-shared non-readonly disk images are transferred. The
      * VIR_MIGRATE_PARAM_MIGRATE_DISKS parameter can be used to specify which
@@ -734,8 +735,8 @@ typedef enum {
      *
      * This flag and VIR_MIGRATE_NON_SHARED_INC are mutually exclusive.
      */
-    VIR_MIGRATE_NON_SHARED_DISK   = (1 << 6),
 
+    VIR_MIGRATE_NON_SHARED_INC    = (1 << 7),
     /* Migrate disk images in addition to domain's memory. This is similar to
      * VIR_MIGRATE_NON_SHARED_DISK, but only the top level of each disk's
      * backing chain is copied. That is, the rest of the backing chain is
@@ -744,15 +745,15 @@ typedef enum {
      *
      * This flag and VIR_MIGRATE_NON_SHARED_DISK are mutually exclusive.
      */
-    VIR_MIGRATE_NON_SHARED_INC    = (1 << 7),
 
+    VIR_MIGRATE_CHANGE_PROTECTION = (1 << 8),
     /* Protect against domain configuration changes during the migration
      * process. This flag is used automatically when both sides support it.
      * Explicitly setting this flag will cause migration to fail if either the
      * source or the destination does not support it.
      */
-    VIR_MIGRATE_CHANGE_PROTECTION = (1 << 8),
 
+    VIR_MIGRATE_UNSAFE            = (1 << 9),
     /* Force migration even if it is considered unsafe. In some cases libvirt
      * may refuse to migrate the domain because doing so may lead to potential
      * problems such as data corruption, and thus the migration is considered
@@ -761,8 +762,8 @@ typedef enum {
      * is unsafe unless the disk images are stored on coherent clustered
      * filesystem, such as GFS2 or GPFS.
      */
-    VIR_MIGRATE_UNSAFE            = (1 << 9),
 
+    VIR_MIGRATE_OFFLINE           = (1 << 10),
     /* Migrate a domain definition without starting the domain on the
      * destination and without stopping it on the source host. Offline
      * migration requires VIR_MIGRATE_PERSIST_DEST to be set.
@@ -770,28 +771,28 @@ typedef enum {
      * Offline migration may not copy disk storage or any other file based
      * storage (such as UEFI variables).
      */
-    VIR_MIGRATE_OFFLINE           = (1 << 10),
 
+    VIR_MIGRATE_COMPRESSED        = (1 << 11),
     /* Compress migration data. The compression methods can be specified using
      * VIR_MIGRATE_PARAM_COMPRESSION. A hypervisor default method will be used
      * if this parameter is omitted. Individual compression methods can be
      * tuned via their specific VIR_MIGRATE_PARAM_COMPRESSION_* parameters.
      */
-    VIR_MIGRATE_COMPRESSED        = (1 << 11),
 
+    VIR_MIGRATE_ABORT_ON_ERROR    = (1 << 12),
     /* Cancel migration if a soft error (such as I/O error) happens during
      * migration.
      */
-    VIR_MIGRATE_ABORT_ON_ERROR    = (1 << 12),
 
+    VIR_MIGRATE_AUTO_CONVERGE     = (1 << 13),
     /* Enable algorithms that ensure a live migration will eventually converge.
      * This usually means the domain will be slowed down to make sure it does
      * not change its memory faster than a hypervisor can transfer the changed
      * memory to the destination host. VIR_MIGRATE_PARAM_AUTO_CONVERGE_*
      * parameters can be used to tune the algorithm.
      */
-    VIR_MIGRATE_AUTO_CONVERGE     = (1 << 13),
 
+    VIR_MIGRATE_RDMA_PIN_ALL      = (1 << 14),
     /* This flag can be used with RDMA migration (i.e., when
      * VIR_MIGRATE_PARAM_URI starts with "rdma://") to tell the hypervisor
      * to pin all domain's memory at once before migration starts rather then
@@ -807,21 +808,20 @@ typedef enum {
      * domain and the host itself since the host's kernel may run out of
      * memory.
      */
-    VIR_MIGRATE_RDMA_PIN_ALL      = (1 << 14),
 
+    VIR_MIGRATE_POSTCOPY          = (1 << 15),
     /* Setting the VIR_MIGRATE_POSTCOPY flag tells libvirt to enable post-copy
      * migration. However, the migration will start normally and
      * virDomainMigrateStartPostCopy needs to be called to switch it into the
      * post-copy mode. See virDomainMigrateStartPostCopy for more details.
      */
-    VIR_MIGRATE_POSTCOPY          = (1 << 15),
 
+    VIR_MIGRATE_TLS               = (1 << 16),
     /* Setting the VIR_MIGRATE_TLS flag will cause the migration to attempt
      * to use the TLS environment configured by the hypervisor in order to
      * perform the migration. If incorrectly configured on either source or
      * destination, the migration will fail.
      */
-    VIR_MIGRATE_TLS               = (1 << 16),
 
 } virDomainMigrateFlags;
 
@@ -2986,16 +2986,16 @@ typedef enum {
  * Details on the cause of a 'shutdown' lifecycle event
  */
 typedef enum {
-    /* Guest finished shutdown sequence */
     VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED = 0,
+    /* Guest finished shutdown sequence */
 
+    VIR_DOMAIN_EVENT_SHUTDOWN_GUEST = 1,
     /* Domain finished shutting down after request from the guest itself
      * (e.g. hardware-specific action) */
-    VIR_DOMAIN_EVENT_SHUTDOWN_GUEST = 1,
 
+    VIR_DOMAIN_EVENT_SHUTDOWN_HOST = 2,
     /* Domain finished shutting down after request from the host (e.g. killed by
      * a signal) */
-    VIR_DOMAIN_EVENT_SHUTDOWN_HOST = 2,
 
 # ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_EVENT_SHUTDOWN_LAST
-- 
2.13.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]
  Powered by Linux