From 9faa8b12d80ffb9615bc07adc2249af60c0e32f8 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 7 Feb 2012 17:01:57 +0000 Subject: 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) (Gratuitous string.h include needed for memset in libxl_util.h) Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl_json.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/libxl/libxl_json.h') diff --git a/tools/libxl/libxl_json.h b/tools/libxl/libxl_json.h index 898dec79e7..bee029317f 100644 --- a/tools/libxl/libxl_json.h +++ b/tools/libxl/libxl_json.h @@ -70,4 +70,7 @@ static inline yajl_gen libxl__yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) #endif /* !HAVE_YAJL_V2 */ +yajl_gen_status libxl_domain_config_gen_json(yajl_gen hand, + libxl_domain_config *p); + #endif /* LIBXL_JSON_H */ -- cgit v1.2.3