diskutil: don't print terse disk util twice for json,terse output format
authorJens Axboe <axboe@fb.com>
Tue, 9 Feb 2016 20:45:50 +0000 (13:45 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 9 Feb 2016 20:45:50 +0000 (13:45 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
diskutil.c

index 074f1307d32212421f20833a8c73ee01b97fc5ab..c25c5c9dccc965bb45e8eaf6cbbcd91afca4e99e 100644 (file)
@@ -717,7 +717,7 @@ void show_disk_util(int terse, struct json_object *parent,
 
        if (do_json)
                json_object_add_disk_utils(parent, &disk_list);
-       if (output_format & ~(FIO_OUTPUT_JSON | FIO_OUTPUT_JSON_PLUS)) {
+       else if (output_format & ~(FIO_OUTPUT_JSON | FIO_OUTPUT_JSON_PLUS)) {
                flist_for_each(entry, &disk_list) {
                        du = flist_entry(entry, struct disk_util, list);