summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-02-08 15:46:46 -0700
committerJens Axboe <axboe@kernel.dk>2018-02-08 15:46:46 -0700
commit0cf542af81751d7b318afe4429001c1aab6baee5 (patch)
treea8c2d632383765ab5f32fc181d15ff6340ef5ff5
parentc69f6bf3ed1b413562d7aab1aa9c476101348726 (diff)
downloadfio-0cf542af81751d7b318afe4429001c1aab6baee5.tar.gz
fio-0cf542af81751d7b318afe4429001c1aab6baee5.tar.bz2
Include 'numjobs' in global options output
Fixes: https://github.com/axboe/fio/issues/237 Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--stat.c8
1 files 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);
}