[PATCHv2 08/10] virterror: clean up several seldom-used errors

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

 



* src/util/virterror.c (virErrorMsg): No current callers for
VIR_ERR_DOM_EXIST, VIR_ERR_OPEN_FAILED, or VIR_ERR_NETWORK_EXIST.
---

Straight cleanup, since there were no callers.

 src/util/virterror.c |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/util/virterror.c b/src/util/virterror.c
index 4c12ba3..af865e0 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -848,12 +848,7 @@ virErrorMsg(virErrorNumber error, const char *info)
             info = NULL;
             break;
         case VIR_ERR_DOM_EXIST:
-            /* FIXME: Adjust all callers before unifying semantics.  */
-            if (info == NULL)
-                errmsg = _("this domain exists already");
-            else
-                errmsg = _("domain %s exists already");
-            info = NULL;
+            errmsg = _("domain already exists");
             break;
         case VIR_ERR_OPERATION_DENIED:
             /* FIXME: Adjust all callers before unifying semantics.  */
@@ -864,12 +859,7 @@ virErrorMsg(virErrorNumber error, const char *info)
             info = NULL;
             break;
         case VIR_ERR_OPEN_FAILED:
-            /* FIXME: Adjust all callers before unifying semantics.  */
-            if (info == NULL)
-                errmsg = _("failed to open configuration file for reading");
-            else
-                errmsg = _("failed to open %s for reading");
-            info = NULL;
+            errmsg = _("failed to open file for reading");
             break;
         case VIR_ERR_READ_FAILED:
             errmsg = _("failed to read configuration file");
@@ -895,12 +885,7 @@ virErrorMsg(virErrorNumber error, const char *info)
             info = NULL;
             break;
         case VIR_ERR_NETWORK_EXIST:
-            /* FIXME: Adjust all callers before unifying semantics.  */
-            if (info == NULL)
-                errmsg = _("this network exists already");
-            else
-                errmsg = _("network %s exists already");
-            info = NULL;
+            errmsg = _("network already exists");
             break;
         case VIR_ERR_SYSTEM_ERROR:
             /* FIXME: Adjust all callers before unifying semantics.  */
-- 
1.7.0.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]