fio: make the gui display thread status
[fio.git] / client.c
index c794d9b1495d14c83eb8ec4f8ba7f70251552791..1b7dee66cb2f424afb29f07e225dbdc77c26af93 100644 (file)
--- a/client.c
+++ b/client.c
@@ -21,6 +21,8 @@
 #include "flist.h"
 #include "hash.h"
 
+extern void (*update_thread_status)(char *status_message);
+
 struct client_eta {
        struct jobs_eta eta;
        unsigned int pending;
@@ -88,6 +90,7 @@ struct client_ops fio_client_ops = {
        handle_gs,
        handle_eta,
        handle_probe,
+       NULL, /* status display, if NULL, printf is used */
 };
 
 static struct timeval eta_tv;
@@ -1015,6 +1018,9 @@ int fio_handle_clients(struct client_ops *ops)
        init_thread_stat(&client_ts);
        init_group_run_stat(&client_gs);
 
+       /* Used by eta.c:display_thread_status() */
+       update_thread_status = ops->thread_status_display;
+
        while (!exit_backend && nr_clients) {
                struct flist_head *entry, *tmp;
                struct fio_client *client;