From: Jens Axboe Date: Sat, 22 May 2010 18:43:11 +0000 (+0200) Subject: Fix problem with --section matching X-Git-Tag: fio-1.39-rc1~1 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=7a4b80a14c6ac6d47d486b1f5d1f166fa7065ee3 Fix problem with --section matching Strip the ']' at the end before doing section matching, otherwise the strcmp() fails. Signed-off-by: Jens Axboe --- 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 ");