From 84dd18865235caa675424c62a4624618ff961d78 Mon Sep 17 00:00:00 2001 From: Bruce Cran Date: Thu, 5 May 2011 08:14:09 -0600 Subject: [PATCH] sscanf fixup I noticed that a job of: [sequential write at 1k block size.] Gets reported as "sequentia". I think we need to use %255[^\n] in sscanf instead. Signed-off-by: Jens Axboe --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.c b/init.c index aa31138c..398dc205 100644 --- a/init.c +++ b/init.c @@ -191,7 +191,7 @@ static void put_job(struct thread_data *td) { if (td == &def_thread) return; - + profile_td_exit(td); if (td->error) @@ -835,7 +835,7 @@ static int parse_jobs_ini(char *file, int stonewall_flag) if (is_empty_or_comment(p)) continue; - if (sscanf(p, "[%255s]", name) != 1) { + if (sscanf(p, "[%255[^\n]]", name) != 1) { if (inside_skip) continue; log_err("fio: option <%s> outside of [] job section\n", -- 2.25.1