[Libosinfo] [PATCH v3 55/60] loader: re-arrange code for loading list of directories
Daniel P. Berrange
berrange at redhat.com
Tue Oct 20 11:18:16 UTC 2015
On Fri, Oct 16, 2015 at 12:28:37PM +0200, Christophe Fergeau wrote:
> On Mon, Oct 12, 2015 at 06:11:16PM +0100, Daniel P. Berrange wrote:
> > Re-arrange the loading code so that there is a single helper
> > method that takes an array of GFile * to load. This will
> > facilitate future code for handling overrides between
> > directories.
> >
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> > osinfo/osinfo_loader.c | 128 ++++++++++++++++++++++++++++---------------------
> > 1 file changed, 73 insertions(+), 55 deletions(-)
> >
> > diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> > index 1c35a3c..b9e47ed 100644
> > --- a/osinfo/osinfo_loader.c
> > +++ b/osinfo/osinfo_loader.c
> > @@ -1848,6 +1848,36 @@ osinfo_loader_process_file(OsinfoLoader *loader,
> > g_propagate_error(err, error);
> > }
> >
> > +
> > +static void osinfo_loader_process_list(OsinfoLoader *loader,
> > + GFile **dirs,
> > + GError **err)
> > +{
> > + GError *lerr = NULL;
> > + GHashTableIter iter;
> > + gpointer key, value;
> > +
> > + while (dirs && *dirs) {
> > + osinfo_loader_process_file(loader,
> > + *dirs,
> > + TRUE,
>
> osinfo_loader_process_system_path() and osinfo_loader_process_uri() were
> setting ignoreMissing to FALSE (this 3rd arg), so this commit is going
> to slightly change their behaviour (I haven't processed the next patches
> yet, maybe this is improved later).
Yeah, it means that a directory which does not exist at all, will now be
treated as non-fatal. eg it'll be equivalent to a directory which exists
but is empty.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the Libosinfo
mailing list