[PATCH] Also print pending string if some threads have yet to run
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 5452716942145f41122c22be01e186a5d9f4bfed..a540304c6b1d928fc05deea96096c0ace01b91b3 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2,6 +2,7 @@
 #include <string.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <dirent.h>
 #include <libgen.h>
 #include <math.h>
@@ -9,7 +10,7 @@
 #include "fio.h"
 
 static struct itimerval itimer;
-static LIST_HEAD(disk_list);
+static struct list_head disk_list = LIST_HEAD_INIT(disk_list);
 
 static int get_io_ticks(struct disk_util *du, struct disk_util_stat *dus)
 {
@@ -351,7 +352,7 @@ static void show_thread_status(struct thread_data *td,
        if (!(td->io_bytes[0] + td->io_bytes[1]) && !td->error)
                return;
 
-       printf("Client%d (groupid=%d): err=%2d:\n", td->thread_number, td->groupid, td->error);
+       printf("%s: (groupid=%d): err=%2d:\n",td->name, td->groupid, td->error);
 
        show_ddir_status(td, rs, td->ddir);
        if (td->io_bytes[td->ddir ^ 1])
@@ -392,7 +393,7 @@ void show_run_stats(void)
                td = &threads[i];
 
                if (td->error) {
-                       printf("Client%d: %s\n", td->thread_number, td->verror);
+                       printf("%s: %s\n", td->name, td->verror);
                        continue;
                }