mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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 <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
13d68fab40
commit
c1f0b21453
1 file changed
+5
-1
@@ -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 */
|
||||
|
||||