[libvirt] [PATCHv1 03/13] Separate out virStorageFeatureParse

Ján Tomko jtomko at redhat.com
Mon Apr 13 13:36:00 UTC 2015


On Mon, Apr 13, 2015 at 07:41:12AM +0200, Peter Krempa wrote:
> On Fri, Apr 10, 2015 at 14:58:55 +0200, Ján Tomko wrote:
> > diff --git a/src/conf/storage_feature_conf.c b/src/conf/storage_feature_conf.c
> > new file mode 100644
> > index 0000000..77e6406
> > --- /dev/null
> > +++ b/src/conf/storage_feature_conf.c
> > @@ -0,0 +1,62 @@
> > +/*
> > + * storage_feature_conf.c: config handling for storage file features
> > + *
> > + * Copyright: Red Hat, Inc
> > + *
> > + * LGLPv2.1+
> > + */
> 
> I like this compact header, but I'm not sure if the rest of upstream has
> the same opinion.
> 
> 

It was just a placeholder and I forgot to update it before sending the
series.

If we want to switch to a more compact header, I think it should be done
consistently all over the codebase.

I have squashed in a copy of the header from another conf file.

> > +                            const char *xpath,
> > +                            char **compat,
> > +                            virBitmapPtr *features)
> > +{
> > +    xmlNodePtr *nodes = NULL;
> > +    char *feat_xpath = NULL;
> > +    size_t i;
> > +    int n;
> > +    int ret = -1;
> > +
> > +    if (!virXPathNode(xpath, ctxt))
> > +        return 0;
> > +
> > +    if (!*compat && VIR_STRDUP(*compat, "1.1") < 0)
> > +        return -1;
> 
> Is there a specific reason that you check whether the compat string is
> not assigned previously?
> 

Yes, the user might have specified a different compat level.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150413/aa828fe9/attachment-0001.sig>


More information about the libvir-list mailing list