From: Ian Campbell Subject: Re: [PATCH 9 of 9] xl: use json output by default Date: Thu, 9 Feb 2012 08:55:33 +0000 Message-ID: <1328777733.6133.98.camel@zakaz.uk.xensource.com> References: <9e3be181b2b70f521def.1327512259@cosworth.uk.xensource.com> <20120209073059.GA20712@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120209073059.GA20712@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 2012-02-09 at 07:30 +0000, Olaf Hering wrote: > On Wed, Jan 25, Ian Campbell wrote: > > > # HG changeset patch > > # User Ian Campbell > > # Date 1327512175 0 > > # Node ID 9e3be181b2b70f521defcd55ecbd9967cd206fb2 > > # Parent f43e2015d86f4d4c7dfa4db69f9d580fb3d705d9 > > xl: use json output by default > > > > Move the sxp producing code off into a separate file. It is supported > > for legacy reasons and needn't be updated other than the improve > > compatibility with xm. > > > > libxl_domain_config is not currently generated by the IDL (adding the > > necessary support for Array types is on my to do list) so hand code > > the json generation function for now. > > > > Since this rather directly exposes a libxl data structure it's not > > clear what sort of forward compatibility guarantees we can > > make. However it seems like it should be as stable as libxl's own API > > (which we are looking to stabilise) > > This leads to build failures with libyajl2: > > xl_cmdimpl.c: In function 'printf_info': > xl_cmdimpl.c:300:5: error: statement with no effect [-Werror=unused-value] > xl_cmdimpl.c:300:21: error: expected ';' before 'conf' > xl_cmdimpl.c:306:28: error: 'conf' undeclared (first use in this function) > xl_cmdimpl.c:306:28: note: each undeclared identifier is reported only once for each function it appears in > xl_cmdimpl.c:306:5: error: too many arguments to function 'yajl_gen_alloc' > /usr/include/yajl/yajl_gen.h:118:23: note: declared here > xl_cmdimpl.c:339:5: error: passing argument 3 of 'yajl_gen_get_buf' from incompatible pointer type [-Werror] > /usr/include/yajl/yajl_gen.h:144:30: note: expected 'size_t *' but argument is of type 'unsigned int *' I suppose we ought to use the helpers defined in libxl_json.h to abstract this away. Could you cook up a patch? Ian.