cli: indent call result data
authorFelix Fietkau <nbd@openwrt.org>
Mon, 18 Jul 2011 11:08:53 +0000 (13:08 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 18 Jul 2011 11:08:53 +0000 (13:08 +0200)
cli.c

diff --git a/cli.c b/cli.c
index 19796cefde99a4c31ace464ab66da49ac52cbd3e..9e16bc8f47bd338b2109e9e5074e500c469d18fc 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -59,7 +59,7 @@ static void receive_list_result(struct ubus_context *ctx, struct ubus_object_dat
                return;
 
        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);
                free(s);
        }
@@ -71,7 +71,7 @@ static void receive_call_result_data(struct ubus_request *req, int type, struct
        if (!msg)
                return;
 
-       str = blobmsg_format_json(msg, true);
+       str = blobmsg_format_json_indent(msg, true, 0);
        printf("%s\n", str);
        free(str);
 }