From 7a4b80a14c6ac6d47d486b1f5d1f166fa7065ee3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 22 May 2010 20:43:11 +0200 Subject: [PATCH] Fix problem with --section matching Strip the ']' at the end before doing section matching, otherwise the strcmp() fails. Signed-off-by: Jens Axboe --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.c b/init.c index 69941b2e..9cc03e89 100644 --- a/init.c +++ b/init.c @@ -776,6 +776,8 @@ static int parse_jobs_ini(char *file, int stonewall_flag) break; } + name[strlen(name) - 1] = '\0'; + if (skip_this_section(name)) { inside_skip = 1; continue; @@ -784,8 +786,6 @@ static int parse_jobs_ini(char *file, int stonewall_flag) global = !strncmp(name, "global", 6); - name[strlen(name) - 1] = '\0'; - if (dump_cmdline) { if (first_sect) log_info("fio "); -- 2.25.1