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 <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index 51b9fa1..4fd41b7 100644
--- a/init.c
+++ b/init.c
@@ -547,11 +547,14 @@
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);