]> granicus.if.org Git - sysstat/commitdiff
Fix output of sadf -j with file-utc-time present
authorMike Kazantsev <mk.fraggod@gmail.com>
Mon, 17 Feb 2014 20:01:26 +0000 (02:01 +0600)
committerfraggod@sacrilege <mk.fraggod@gmail.com>
Mon, 17 Feb 2014 20:01:26 +0000 (02:01 +0600)
Commit aea4561 added "file-utc-time" parameter output (if present in the
datafile), but didn't add comma before it in "sadf -j" output, making it
unparseable. Fix that.

sadf_misc.c

index 9fb2a8ade9a92636e52c8923994c74dbfccb52f6..5d16ce3ee9e30985823613a721c40b55481c438b 100644 (file)
@@ -579,7 +579,7 @@ __printf_funct_t print_json_header(int *tab, int action, char *dfile,
                
                if ((loc_t = gmtime((const time_t *) &file_hdr->sa_ust_time)) != NULL) {
                        strftime(cur_time, sizeof(cur_time), "%T", loc_t);
-                       printf("\n");
+                       printf(",\n");
                        xprintf0(*tab, "\"file-utc-time\": \"%s\"", cur_time);
                }