From 6c7c7da18aa2ab744b9485482e64acd30f31da6d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 29 Mar 2007 14:12:57 -0800 Subject: [PATCH] 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 --- init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.25.1