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

Re: [Xen-devel] [PATCH V4 09/24] libxl_json: introduce parser functions for builtin types



On Tue, 2014-05-06 at 14:06 +0100, Wei Liu wrote:

> > > yajl_gen_integer to generate JSON object.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > 
> > Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > 
> > With one small question:
> > 
> > [...]
> > > diff --git a/tools/libxl/libxl_nocpuid.c b/tools/libxl/libxl_nocpuid.c
> > > index 5f7cb6a..eb525fc 100644
> > > --- a/tools/libxl/libxl_nocpuid.c
> > > +++ b/tools/libxl/libxl_nocpuid.c
> > > @@ -44,6 +44,13 @@ yajl_gen_status 
> > > libxl_cpuid_policy_list_gen_json(yajl_gen hand,
> > >      return 0;
> > >  }
> > >  
> > > +int libxl_cpuid_policy_list_parse_json(libxl__gc *gc,
> > > +                                       const libxl__json_object *o,
> > > +                                       libxl_cpuid_policy_list *p)
> > > +{
> > > +    return 0;
> > 
> > Not an error of some sort? Or even an assert?
> > 
> 
> I didn't see assertion in libxl_cpuid_policy_list_gen_json either, so I
> presumed it is not necessary and returning "success" is enough.

Generating a "NULL" json from a NULL cpuid policy is one thing, but
parsing a valid cpuid policy into NULL might be more surprising? OTOH
libxl_cpuid_parse_config just returns success, and I suppose this is
equivalent.

OK, my ack stands.

Ian.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.