X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=stat.c;h=ca733108a879b772d45186a0600e8439f9f50433;hb=caa3eb1c86f9ca0e0063485f0ff0a1fca0dc3af2;hp=4529f6948bcb5bb64a938fdfe66a7a1b57992a21;hpb=10aa136bddbaa7c845ab4eacb4a9a4a88d6657a3;p=fio.git diff --git a/stat.c b/stat.c index 4529f694..ca733108 100644 --- a/stat.c +++ b/stat.c @@ -770,7 +770,7 @@ static void add_ddir_status_json(struct thread_stat *ts, } json_object_add_value_int(dir_object, "bw_min", min); json_object_add_value_int(dir_object, "bw_max", max); - json_object_add_value_float(dir_object, "bw_agg", mean); + json_object_add_value_float(dir_object, "bw_agg", p_of_agg); json_object_add_value_float(dir_object, "bw_mean", mean); json_object_add_value_float(dir_object, "bw_dev", dev); } @@ -831,7 +831,7 @@ static void show_thread_status_terse_v2(struct thread_stat *ts, log_info("\n"); /* Additional output if description is set */ - if (ts->description) + if (strlen(ts->description)) log_info(";%s", ts->description); log_info("\n"); @@ -1494,8 +1494,11 @@ static int check_status_file(void) return 0; temp_dir = getenv("TMPDIR"); - if (temp_dir == NULL) + if (temp_dir == NULL) { temp_dir = getenv("TEMP"); + if (temp_dir && strlen(temp_dir) >= PATH_MAX) + temp_dir = NULL; + } if (temp_dir == NULL) temp_dir = "/tmp";