Re: [dbus PATCH 4/4] Introduce functions for translating Events to strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2018-03-29 at 15:11 +0200, Ján Tomko wrote:
> On Thu, Mar 29, 2018 at 02:44:54PM +0200, Pavel Hrdina wrote:
> > On Thu, Mar 29, 2018 at 01:07:58PM +0200, Katerina Koukiou wrote:
> > > The functions were copied from src/util/virutil.* files from
> > > libvirt project.
> > > 
> > > They will be needed for other function of enum to string
> > > as well.
> > 
> > This should be split into two patches, one that introduces the
> > new macros and second one that uses them.
> > 
> > > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> > > ---
> > >  m4/virt-compile-warnings.m4 |  3 +++
> > >  src/events.c                | 35 +----------------------------
> > > ------
> > >  src/util.c                  | 30 ++++++++++++++++++++++++++++++
> > >  src/util.h                  | 30 ++++++++++++++++++++++++++++++
> > >  test/test_connect.py        |  4 ++--
> > >  test/test_domain.py         |  8 ++++----
> > >  6 files changed, 70 insertions(+), 40 deletions(-)
> > > 
> > > diff --git a/src/util.h b/src/util.h
> > > index 4304bac..22cf25e 100644
> > > --- a/src/util.h
> > > +++ b/src/util.h
> > > @@ -2,6 +2,7 @@
> > > 
> > >  #include "gdbus.h"
> > > 
> > > +#define VIR_ENUM_SENTINELS
> > >  #include <libvirt/libvirt.h>
> > > 
> > >  #define VIRT_DBUS_ERROR virtDBusErrorQuark()
> > > @@ -37,3 +38,32 @@ virtDBusUtilVirDomainListFree(virDomainPtr
> > > *domains);
> > > 
> > >  G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomain, virDomainFree);
> > >  G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainPtr,
> > > virtDBusUtilVirDomainListFree);
> > > +
> > > +gint virEnumFromString(const gchar *const*types,
> > > +                       guint ntypes,
> > > +                       const gchar *type);
> 
> The definition of this function is also missing.

Yes, I already realized it when I tried to rename it from the name used
in libvirt to something else.
Fixed.

> 
> Jano

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux