[PATCH] util: authconfig: use g_key_file_*

Daniel P. Berrangé berrange at redhat.com
Mon Mar 23 13:04:48 UTC 2020


On Mon, Mar 23, 2020 at 01:54:07PM +0100, Michal Prívozník wrote:
> On 20. 3. 2020 18:06, Rafael Fonseca wrote:
> > Replace libvirt's virKeyFile by glib's GKeyFile.
> > 
> > Signed-off-by: Rafael Fonseca <r4f4rfs at gmail.com>
> > ---
> >  src/util/virauthconfig.c | 25 +++++++++++--------------
> >  1 file changed, 11 insertions(+), 14 deletions(-)
> > 
> > diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c
> > index fd846ddd4b..473b4c76d6 100644
> > --- a/src/util/virauthconfig.c
> > +++ b/src/util/virauthconfig.c
> > @@ -29,7 +29,7 @@
> >  #include "viralloc.h"
> >  
> >  struct _virAuthConfig {
> > -    virKeyFilePtr keyfile;
> > +    GKeyFile *keyfile;
> >      char *path;
> >  };
> >  
> 
> There is one difference between virKeyFile format and GKeyFile. Whereas
> latter accepts comments only starting with '#', the former also accepts
> ';' (.ini style comments). However, I don't think anybody sane is using
> ';' to start a comment, therefore I'm inclined to merge this patch.

Yeah, I'm not concerned by that difference. At the worst, a release
note is needed, and anyone affected can trivially change, not that I
expect anyone will need to.

> If I do, whole src/util/virkeyfile.c module and tests/virkeyfiletest.c
> test can be removed too. Do you mind sending v2 where this would be the
> first patch and in the second you remove the module, test and
> correspodning symbols from src/libvirt_private.syms?

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list