projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fio.1: man page fixes
[fio.git]
/
diskutil.c
diff --git
a/diskutil.c
b/diskutil.c
index c3181b5bcd1f87bbe194892717852f1e9df0e6fb..c25c5c9dccc965bb45e8eaf6cbbcd91afca4e99e 100644
(file)
--- a/
diskutil.c
+++ b/
diskutil.c
@@
-695,6
+695,7
@@
void show_disk_util(int terse, struct json_object *parent,
{
struct flist_head *entry;
struct disk_util *du;
{
struct flist_head *entry;
struct disk_util *du;
+ bool do_json;
if (!disk_util_mutex)
return;
if (!disk_util_mutex)
return;
@@
-706,15
+707,17
@@
void show_disk_util(int terse, struct json_object *parent,
return;
}
return;
}
- if (output_format & FIO_OUTPUT_JSON)
- assert(parent);
+ if ((output_format & FIO_OUTPUT_JSON) && parent)
+ do_json = true;
+ else
+ do_json = false;
- if (!terse && !
(output_format & FIO_OUTPUT_JSON)
)
+ if (!terse && !
do_json
)
log_buf(out, "\nDisk stats (read/write):\n");
log_buf(out, "\nDisk stats (read/write):\n");
- if (
output_format & FIO_OUTPUT_JSON
)
+ if (
do_json
)
json_object_add_disk_utils(parent, &disk_list);
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);
flist_for_each(entry, &disk_list) {
du = flist_entry(entry, struct disk_util, list);