cli: prevent indenting if simple output is requested
authorFelix Fietkau <nbd@openwrt.org>
Wed, 14 Mar 2012 15:32:06 +0000 (16:32 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 6 May 2012 08:22:29 +0000 (10:22 +0200)
cli.c

diff --git a/cli.c b/cli.c
index 98744cf32ea75678da9041d72735b73d8f9d606d..de159473cb58077b2426a9c97eb5ebf9cd72b312 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -72,7 +72,7 @@ static void receive_call_result_data(struct ubus_request *req, int type, struct
        if (!msg)
                return;
 
-       str = blobmsg_format_json_indent(msg, true, 0);
+       str = blobmsg_format_json_indent(msg, true, simple_output ? -1 : 0);
        printf("%s\n", str);
        free(str);
 }