From 0cf542af81751d7b318afe4429001c1aab6baee5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Feb 2018 15:46:46 -0700 Subject: [PATCH] Include 'numjobs' in global options output Fixes: https://github.com/axboe/fio/issues/237 Signed-off-by: Jens Axboe --- stat.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stat.c b/stat.c index a980a1d2..bd2c27d0 100644 --- a/stat.c +++ b/stat.c @@ -1226,7 +1226,7 @@ static void show_thread_status_terse_all(struct thread_stat *ts, } static void json_add_job_opts(struct json_object *root, const char *name, - struct flist_head *opt_list, bool num_jobs) + struct flist_head *opt_list) { struct json_object *dir_object; struct flist_head *entry; @@ -1242,8 +1242,6 @@ static void json_add_job_opts(struct json_object *root, const char *name, const char *pos = ""; p = flist_entry(entry, struct print_option, list); - if (!num_jobs && !strcmp(p->name, "numjobs")) - continue; if (p->value) pos = p->value; json_object_add_value_string(dir_object, p->name, pos); @@ -1277,7 +1275,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts, } if (opt_list) - json_add_job_opts(root, "job options", opt_list, true); + json_add_job_opts(root, "job options", opt_list); add_ddir_status_json(ts, rs, DDIR_READ, root); add_ddir_status_json(ts, rs, DDIR_WRITE, root); @@ -1878,7 +1876,7 @@ void __show_run_stats(void) json_object_add_value_int(root, "timestamp_ms", ms_since_epoch); json_object_add_value_string(root, "time", time_buf); global = get_global_options(); - json_add_job_opts(root, "global options", &global->opt_list, false); + json_add_job_opts(root, "global options", &global->opt_list); array = json_create_array(); json_object_add_value_array(root, "jobs", array); } -- 2.25.1