We currently have other error codes in singular form, e.g.
VIR_ERR_NETWORK_EXIST. Cleanup the previous patch to match the form.

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 include/libvirt/virterror.h  | 2 +-
 src/storage/storage_driver.c | 2 +-
 src/util/virerror.c          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index fd14237..e31e9c4 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -296,7 +296,7 @@ typedef enum {
     VIR_ERR_ACCESS_DENIED = 88,         /* operation on the object/resource
                                            was denied */
     VIR_ERR_DBUS_SERVICE = 89,          /* error from a dbus service */
-    VIR_ERR_STORAGE_VOL_EXISTS = 90,         /* the storage vol already exists 
*/
+    VIR_ERR_STORAGE_VOL_EXIST = 90,     /* the storage vol already exists */
 } virErrorNumber;
 
 /**
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index d419a36..b3f0871 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1538,7 +1538,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
         goto cleanup;
 
     if (virStorageVolDefFindByName(pool, voldef->name)) {
-        virReportError(VIR_ERR_STORAGE_VOL_EXISTS,
+        virReportError(VIR_ERR_STORAGE_VOL_EXIST,
                        _("'%s'"), voldef->name);
         goto cleanup;
     }
diff --git a/src/util/virerror.c b/src/util/virerror.c
index 3f55cec..d9a9fc4 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -1004,7 +1004,7 @@ virErrorMsg(virErrorNumber error, const char *info)
             else
                 errmsg = _("Storage volume not found: %s");
             break;
-        case VIR_ERR_STORAGE_VOL_EXISTS:
+        case VIR_ERR_STORAGE_VOL_EXIST:
             if (info == NULL)
                 errmsg = _("this storage volume exists already");
             else
-- 
1.8.1.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to