[libvirt] [PATCH] Consistently use 'CANCELED' spelling in public API

Christophe Fergeau cfergeau at redhat.com
Mon Aug 19 09:44:39 UTC 2013


Most constant names in libvirt public API are using the 'CANCELED'
spelling, except for VIR_DOMAIN_JOB_CANCELLED and
VIR_ERR_AUTH_CANCELLED.

This commit changes the spelling used by these 2 symbols to make
it consistant with the rest of the API. For backwards compatibility,
2 #define are introduced using the old spelling (with 2 'L').

Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 include/libvirt/libvirt.h.in | 10 +++++++++-
 include/libvirt/virterror.h  | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 52ac95d..91efa8c 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -4031,13 +4031,21 @@ typedef enum {
     VIR_DOMAIN_JOB_UNBOUNDED = 2, /* Job without a finite completion time */
     VIR_DOMAIN_JOB_COMPLETED = 3, /* Job has finished, but isn't cleaned up */
     VIR_DOMAIN_JOB_FAILED    = 4, /* Job hit error, but isn't cleaned up */
-    VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up */
+    VIR_DOMAIN_JOB_CANCELED  = 5, /* Job was aborted, but isn't cleaned up */
 
 #ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_JOB_LAST
 #endif
 } virDomainJobType;
 
+/**
+ * VIR_DOMAIN_JOB_CANCELLED:
+ *
+ * Deprecated name for VIR_DOMAIN_JOB_CANCELED. Provided for backwards
+ * compatibility.
+ */
+#define VIR_DOMAIN_JOB_CANCELLED VIR_DOMAIN_JOB_CANCELED
+
 typedef struct _virDomainJobInfo virDomainJobInfo;
 typedef virDomainJobInfo *virDomainJobInfoPtr;
 struct _virDomainJobInfo {
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index c1960c8..b525f96 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -282,7 +282,7 @@ typedef enum {
                                            risky domain snapshot revert */
     VIR_ERR_OPERATION_ABORTED = 78,     /* operation on a domain was
                                            canceled/aborted by user */
-    VIR_ERR_AUTH_CANCELLED = 79,        /* authentication cancelled */
+    VIR_ERR_AUTH_CANCELED = 79,         /* authentication cancelled */
     VIR_ERR_NO_DOMAIN_METADATA = 80,    /* The metadata is not present */
     VIR_ERR_MIGRATE_UNSAFE = 81,        /* Migration is not safe */
     VIR_ERR_OVERFLOW = 82,              /* integer overflow */
@@ -299,6 +299,14 @@ typedef enum {
 } virErrorNumber;
 
 /**
+ * VIR_ERR_AUTH_CANCELLED:
+ *
+ * Deprecated name for VIR_ERR_AUTH_CANCELED. Provided for backwards
+ * compatibility.
+ */
+#define VIR_ERR_AUTH_CANCELLED VIR_ERR_AUTH_CANCELED
+
+/**
  * virErrorFunc:
  * @userData:  user provided data for the error callback
  * @error:  the error being raised.
-- 
1.8.3.1




More information about the libvir-list mailing list