File sysstat-10.2.6-fix-json-with-file-utc-time.patch of Package sysstat.1310
From 1028e3e893cc7c6a245508d22db31e4682ddf7cf Mon Sep 17 00:00:00 2001
From: Mike Kazantsev <mk.fraggod@gmail.com>
Date: Tue, 18 Feb 2014 02:01:26 +0600
Subject: [PATCH] Fix output of sadf -j with file-utc-time present
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sadf_misc.c b/sadf_misc.c
index 9fb2a8a..5d16ce3 100644
--- a/sadf_misc.c
+++ b/sadf_misc.c
@@ -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);
}