json output fixups
authorVincent Fu <vincent.fu@sandisk.com>
Wed, 11 Nov 2015 18:26:37 +0000 (11:26 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 11 Nov 2015 18:26:37 +0000 (11:26 -0700)
- diskutil json+ fixup

- idletime missed a conversion for the multiple output formats

Signed-off-by: Jens Axboe <axboe@fb.com>
diskutil.c
idletime.c

index f83fc47569cff5e0206c5f621919b1e5b1dbe4d0..c3181b5bcd1f87bbe194892717852f1e9df0e6fb 100644 (file)
@@ -714,7 +714,7 @@ void show_disk_util(int terse, struct json_object *parent,
 
        if (output_format & FIO_OUTPUT_JSON)
                json_object_add_disk_utils(parent, &disk_list);
-       if (output_format & ~(FIO_OUTPUT_JSON)) {
+       if (output_format & ~(FIO_OUTPUT_JSON | FIO_OUTPUT_JSON_PLUS)) {
                flist_for_each(entry, &disk_list) {
                        du = flist_entry(entry, struct disk_util, list);
 
index 5cc8b65f6051d6822e28ab536d8d6c675d501ddb..fab43c535df2e1f065e4b6a01f4dac3e7ae9f87e 100644 (file)
@@ -481,7 +481,7 @@ void show_idle_prof_stats(int output, struct json_object *parent,
                return;
        }
 
-       if ((ipc.opt != IDLE_PROF_OPT_NONE) && (output == FIO_OUTPUT_JSON)) {
+       if ((ipc.opt != IDLE_PROF_OPT_NONE) && (output & FIO_OUTPUT_JSON)) {
                if (!parent)
                        return;