Fix --showcmd bug
Only append 'fio' if this is the first time we see a [] section.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index b5f9abc..da2595c 100644
--- a/init.c
+++ b/init.c
@@ -555,6 +555,7 @@
FILE *f;
char *p;
int ret = 0, stonewall;
+ int first_sect = 1;
f = fopen(file, "r");
if (!f) {
@@ -587,9 +588,11 @@
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);