From: Jens Axboe Date: Thu, 29 Mar 2007 22:12:57 +0000 (-0800) Subject: Warn when seeing a job option outside of a job section X-Git-Tag: fio-1.15.1~9 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=6c7c7da18aa2ab744b9485482e64acd30f31da6d Warn when seeing a job option outside of a job section Otherwise it's easy to screw up because fio will have ignored a number of options. This has happened to me with bad pasting of job files before, missing the starting '[' bracket. Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 51b9fa1d..4fd41b7d 100644 --- a/init.c +++ b/init.c @@ -547,11 +547,14 @@ static int parse_jobs_ini(char *file, int stonewall_flag) break; strip_blank_front(&p); + strip_blank_end(p); if (is_empty_or_comment(p)) continue; - if (sscanf(p, "[%255s]", name) != 1) + if (sscanf(p, "[%255s]", name) != 1) { + log_err("fio: option <%s> outside of job section\n", p); continue; + } global = !strncmp(name, "global", 6);