summaryrefslogtreecommitdiff
path: root/diskutil.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-04-26 09:02:34 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-04-26 09:02:34 +0200
commit0a839f308177e95c4c45c41ee1d4fa2b8f231f24 (patch)
treefddfb17571948d4a9a0a3d4371a516f01d475aaa /diskutil.c
parent733ed597a79e118bc2480974a4dc4676f2edede1 (diff)
downloadfio-0a839f308177e95c4c45c41ee1d4fa2b8f231f24.tar.gz
Disk stat improvements
Add an option to disable the disk stats. And only dump the disk stat header, if we actually have stats to show. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'diskutil.c')
-rw-r--r--diskutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/diskutil.c b/diskutil.c
index 11d676fc..bbaa22d5 100644
--- a/diskutil.c
+++ b/diskutil.c
@@ -313,6 +313,9 @@ void show_disk_util(void)
struct disk_util *du;
double util;
+ if (list_empty(&disk_list))
+ return;
+
log_info("\nDisk stats (read/write):\n");
list_for_each(entry, &disk_list) {