[libvirt] [PATCH 2/3] Pull lxcContainerGetSubtree out into shared virfile module

Daniel P. Berrange berrange at redhat.com
Thu Nov 28 11:36:43 UTC 2013


On Wed, Nov 27, 2013 at 03:25:28PM -0700, Eric Blake wrote:
> On 11/27/2013 09:31 AM, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> > 
> > Move the code for lxcContainerGetSubtree into the virfile
> > module creating 2 new functions
> > 
> >   int virFileGetMountSubtree(const char *mtabpath,
> >                              const char *prefix,
> >                              char ***mountsret,
> >                              size_t *nmountsret);
> >   int virFileGetMountReverseSubtree(const char *mtabpath,
> >                                     const char *prefix,
> >                                     char ***mountsret,
> >                                     size_t *nmountsret);
> > 
> > Add a new virfiletest.c test case to validate the new code.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> 
> > @@ -1747,6 +1749,8 @@ virStringArrayHasString;
> >  virStringFreeList;
> >  virStringJoin;
> >  virStringListLength;
> > +virStringSortCompare;
> > +virStringSortRevCompare;
> 
> Maybe worth splitting this into an independent patch, as virsh also
> could use it.

Actually virsh can't use it - it sorts virDomainPtr instances
rather than just the name strings.

That said I've split it off anyway, and added a test case to
virstringtest.c

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 libvir-list mailing list