From c1f0b214536773630cd5f16bf3d275015373555b Mon Sep 17 00:00:00 2001 From: M A Young Date: Fri, 12 Apr 2013 00:02:11 +0100 Subject: libxl: beautify json with YAJL2 xl list -l should produce readable output when built with yajl2 so it is compatible with the xendomains script. Signed-off-by: Michael Young Acked-by: Ian Campbell --- tools/libxl/libxl_json.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_json.h b/tools/libxl/libxl_json.h index 1464459141..a4dd8fcaca 100644 --- a/tools/libxl/libxl_json.h +++ b/tools/libxl/libxl_json.h @@ -54,7 +54,11 @@ static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) { - return yajl_gen_alloc(allocFuncs); + yajl_gen g; + g = yajl_gen_alloc(allocFuncs); + if (g) + yajl_gen_config(g, yajl_gen_beautify, 1); + return g; } #else /* !HAVE_YAJL_V2 */ -- cgit v1.2.3