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:
M A Young authored and Ian Campbell committed 2013-04-12 12:21:02 +01:00
1 parent 13d68fab40
commit c1f0b21453
1 file changed
+5 -1
+5 -1
View File
@@ -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 */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.