check output_format before calling show_idle_prof_stats()
authorHuadong Liu <HLiu@fusionio.com>
Thu, 21 Feb 2013 09:24:20 +0000 (10:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 09:25:26 +0000 (10:25 +0100)
Do the proper checks for output format type and whether we are
a server backend or not.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c

diff --git a/stat.c b/stat.c
index 759bcef90adb6e7744882e2b76f342001de9ae4c..fe09a2968e6b4cfea853ef526640fd46eee58faa 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1358,10 +1358,10 @@ void show_run_stats(void)
 
        if (is_backend)
                fio_server_send_du();
-       else if (output_format == FIO_OUTPUT_NORMAL)
+       else if (output_format == FIO_OUTPUT_NORMAL) {
                show_disk_util(0, NULL);
-
-       show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL);
+               show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL);
+       }
 
        free(runstats);
        free(threadstats);