From: Wei Liu Subject: Re: [PATCH V4 09/24] libxl_json: introduce parser functions for builtin types Date: Tue, 6 May 2014 14:06:42 +0100 Message-ID: <20140506130641.GF17067@zion.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-10-git-send-email-wei.liu2@citrix.com> <1399381058.3014.121.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1399381058.3014.121.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Anthony Perard , ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, May 06, 2014 at 01:57:38PM +0100, Ian Campbell wrote: > On Thu, 2014-05-01 at 13:58 +0100, Wei Liu wrote: > > Anthony, are you OK with this one now? > > > This changeset introduces following functions: > > * libxl_defbool_parse_json > > * libxl__bool_parse_json > > * libxl_uuid_parse_json > > * libxl_mac_parse_json > > * libxl_bitmap_parse_json > > * libxl_cpuid_policy_list_parse_json > > * libxl_string_list_parse_json > > * libxl_key_value_list_parse_json > > * libxl_hwcap_parse_json > > * libxl__int_parse_json > > * libxl__uint{8,16,32,64}_parse_json > > * libxl__string_parse_json > > > > They will be used in later patch to convert the libxl__json_object > > tree of a builtin type to libxl_FOO struct. > > > > Also remove delcaration of libxl_domid_gen_json as libxl_domid uses > > "declaration" > Thanks. > > yajl_gen_integer to generate JSON object. > > > > Signed-off-by: Wei Liu > > Acked-by: Ian Campbell > > 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. Wei.