cli: indent call result data

This commit is contained in:
Felix Fietkau 2011-07-18 13:08:53 +02:00
parent 42bc27ae38
commit 460672c6da

4
cli.c
View file

@ -59,7 +59,7 @@ static void receive_list_result(struct ubus_context *ctx, struct ubus_object_dat
return; return;
blob_for_each_attr(cur, obj->signature, rem) { blob_for_each_attr(cur, obj->signature, rem) {
s = blobmsg_format_json_with_cb(cur, false, format_type, NULL); s = blobmsg_format_json_with_cb(cur, false, format_type, NULL, -1);
printf("\t%s\n", s); printf("\t%s\n", s);
free(s); free(s);
} }
@ -71,7 +71,7 @@ static void receive_call_result_data(struct ubus_request *req, int type, struct
if (!msg) if (!msg)
return; return;
str = blobmsg_format_json(msg, true); str = blobmsg_format_json_indent(msg, true, 0);
printf("%s\n", str); printf("%s\n", str);
free(str); free(str);
} }