Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util.c | 4 ++--
src/util.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util.c b/src/util.c
index 962eaab..3e6be4e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -66,14 +66,14 @@ virtDBusUtilSetLastVirtError(sd_bus_error *error)
if (!vir_error)
return 0;
- return sd_bus_error_set(error, "org.libvirt.Error",
vir_error->message);
+ return sd_bus_error_set(error, VIRT_DBUS_ERROR_INTERFACE, vir_error->message);
}
int
virtDBusUtilSetError(sd_bus_error *error,
const char *message)
{
- return sd_bus_error_set(error, "org.libvirt.Error", message);
+ return sd_bus_error_set(error, VIRT_DBUS_ERROR_INTERFACE, message);
}
char *
diff --git a/src/util.h b/src/util.h
index a772ffe..c92674f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -5,6 +5,8 @@
#include <systemd/sd-bus.h>
#include <unistd.h>
+#define VIRT_DBUS_ERROR_INTERFACE "org.libvirt.Error"
+
#define _cleanup_(_x) __attribute__((__cleanup__(_x)))
#define VIRT_ATTR_UNUSED __attribute__((__unused__))
--
2.14.3