On Thu, May 10, 2018 at 07:26:05PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> > --- > data/org.libvirt.Domain.xml | 8 ++++++++ > src/events.c | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 38 insertions(+) > > diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml > index c52f9d4..0cc0080 100644 > --- a/data/org.libvirt.Domain.xml > +++ b/data/org.libvirt.Domain.xml > @@ -650,6 +650,14 @@ > <arg name="device" type="s"/> > <arg name="action" type="i"/> > </signal> > + <signal name="IOErrorReason"> > + <annotation name="org.gtk.GDBus.DocString" > + value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventIOErrorReasonCallback"/> > + <arg name="srcPath" type="s"/> > + <arg name="device" type="s"/> > + <arg name="action" type="i"/> > + <arg name="reason" type="s"/> > + </signal> > <signal name="TrayChange"> > <annotation name="org.gtk.GDBus.DocString" > value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventTrayChangeCallback"/> > diff --git a/src/events.c b/src/events.c > index b7aa4e5..433dba3 100644 > --- a/src/events.c > +++ b/src/events.c > @@ -265,6 +265,32 @@ virtDBusEventsDomainIOError(virConnectPtr connection G_GNUC_UNUSED, > return 0; > } > > +static gint > +virtDBusEventsDomainIOErrorReason(virConnectPtr connection G_GNUC_UNUSED, > + virDomainPtr domain, > + const gchar *srcPath, > + const gchar *device, > + gint action, > + const gchar *reason, > + gpointer opaque) > +{ > + virtDBusConnect *connect = opaque; > + g_autofree gchar *path = NULL; > + > + path = virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); > + > + g_dbus_connection_emit_signal(connect->bus, > + NULL, > + path, > + VIRT_DBUS_DOMAIN_INTERFACE, > + "IOErrorReason", > + g_variant_new("(ssis)", srcPath, device, > + action, reason), > + NULL); It's not documented but looking at the libvirt code the device can be NULL. Pavel
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list