From: Jens Axboe Date: Thu, 19 Apr 2007 07:41:45 +0000 (+0200) Subject: Fix --showcmd bug X-Git-Tag: fio-1.16~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=097b2991ace8e069dbfb0c2286d31da714247573 Fix --showcmd bug Only append 'fio' if this is the first time we see a [] section. Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index b5f9abce..da2595c7 100644 --- a/init.c +++ b/init.c @@ -555,6 +555,7 @@ static int parse_jobs_ini(char *file, int stonewall_flag) FILE *f; char *p; int ret = 0, stonewall; + int first_sect = 1; f = fopen(file, "r"); if (!f) { @@ -587,9 +588,11 @@ static int parse_jobs_ini(char *file, int stonewall_flag) name[strlen(name) - 1] = '\0'; if (dump_cmdline) { - log_info("fio "); + if (first_sect) + log_info("fio "); if (!global) log_info("--name=%s ", name); + first_sect = 0; } td = get_new_job(global, &def_thread);