Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Domain.xml | 2 +-
src/events.c | 17 ++---------------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index 3627b1b..a09e868 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -572,7 +572,7 @@
<arg name="oldSrcPath" type="s"/>
<arg name="newSrcPath" type="s"/>
<arg name="device" type="s"/>
- <arg name="reason" type="s"/>
+ <arg name="reason" type="u"/>
</signal>
<signal name="TrayChange">
<annotation name="org.gtk.GDBus.DocString"
diff --git a/src/events.c b/src/events.c
index d4c7145..b432535 100644
--- a/src/events.c
+++ b/src/events.c
@@ -105,29 +105,16 @@ virtDBusEventsDomainDiskChange(virConnectPtr connection
G_GNUC_UNUSED,
{
virtDBusConnect *connect = opaque;
g_autofree gchar *path = NULL;
- const gchar *reasonstr;
path = virtDBusUtilBusPathForVirDomain(domain, connect->domainPath);
- switch (reason) {
- case VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START:
- reasonstr = "missing-on-start";
- break;
- case VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START:
- reasonstr = "missing-on-start";
- break;
- default:
- reasonstr = "";
- break;
- }
-
g_dbus_connection_emit_signal(connect->bus,
NULL,
path,
VIRT_DBUS_DOMAIN_INTERFACE,
"DiskChange",
- g_variant_new("(ssss)", old_src_path,
- new_src_path, device, reasonstr),
+ g_variant_new("(sssu)", old_src_path,
+ new_src_path, device, reason),
NULL);
return 0;
--
2.15.0