]> xenbits.xensource.com Git - libvirt.git/commitdiff
virdbus: Remove redundant error macro
authorCole Robinson <crobinso@redhat.com>
Sat, 3 May 2014 19:46:52 +0000 (15:46 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 21 May 2014 13:33:24 +0000 (09:33 -0400)
This is the only callsite.

We drop use of localerror.name here, because it's not actually useful
to us: rather than the parameter name which received an invalid value
(which was assumed), it's actually the the dbus errno equivalent.
Just use the error string.

Acked-by: Eric Blake <eblake@redhat.com>
src/util/virdbus.c
src/util/virerror.h

index 709d6ee4635ebba53987d021a3a0418511afedf7..03ec028dc98f93c29e500b12c96f71eda55d1b3e 100644 (file)
@@ -1423,9 +1423,10 @@ virDBusCall(DBusConnection *conn,
                                                             error ? error : &localerror))) {
         if (error)
             ret = 0;
-        else
-            virReportDBusServiceError(localerror.message ? localerror.message : "unknown error",
-                                      localerror.name);
+        else {
+            virReportError(VIR_ERR_DBUS_SERVICE, "%s",
+                localerror.message ? localerror.message : _("unknown error"));
+        }
         goto cleanup;
     }
 
index fe0e15efe88457e99ec9f38a9c0a56e2a1967dcd..5c8578f7912ae70f68a37cecc10c3671f9947bc3 100644 (file)
@@ -145,17 +145,6 @@ void virReportSystemErrorFull(int domcode,
                       0, 0,                                          \
                       (fmt), __VA_ARGS__)
 
-# define virReportDBusServiceError(message, name)                    \
-    virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,              \
-                      VIR_FROM_THIS,                                 \
-                      VIR_ERR_DBUS_SERVICE,                          \
-                      VIR_ERR_ERROR,                                 \
-                      __FUNCTION__,                                  \
-                      name,                                          \
-                      NULL,                                          \
-                      0, 0,                                          \
-                      "%s", message);
-
 # define virReportUnsupportedError()                                    \
     virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_NO_SUPPORT,             \
                          __FILE__, __FUNCTION__, __LINE__, __FUNCTION__)