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 string. Acked-by: Eric Blake <eblake@xxxxxxxxxx> --- src/util/virdbus.c | 7 ++++--- src/util/virerror.h | 6 ------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index 709d6ee..03ec028 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -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; } diff --git a/src/util/virerror.h b/src/util/virerror.h index 872c270..4b01b77 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -110,12 +110,6 @@ void virReportSystemErrorFull(int domcode, __FILE__, __FUNCTION__, __LINE__, \ (fmt), __VA_ARGS__) -# define virReportDBusServiceError(message, name) \ - virReportErrorHelper(VIR_FROM_THIS, \ - VIR_ERR_DBUS_SERVICE, \ - __FILE__, __FUNCTION__, __LINE__, \ - "%s", message) - # define virReportUnsupportedError() \ virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_NO_SUPPORT, \ __FILE__, __FUNCTION__, __LINE__, __FUNCTION__) -- 1.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list