From 4f693b9de45f8fe4a893bd4c3de7c3dc17979386 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 7 Jun 2006 22:52:28 +0200 Subject: [PATCH] [PATCH] Warn on conflicting read/write iolog --- init.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/init.c b/init.c index 037dd316..3b1f8828 100644 --- a/init.c +++ b/init.c @@ -871,11 +871,13 @@ int parse_jobs_ini(char *file) continue; } if (!check_strstore(p, "iolog", tmpbuf)) { - if (td->iolog_file) + if (td->write_iolog) { + fprintf(stderr, "fio: read iolog overrides given write_iolog\n"); free(td->iolog_file); + td->write_iolog = 0; + } td->iolog_file = strdup(tmpbuf); td->read_iolog = 1; - td->write_iolog = 0; fgetpos(f, &off); continue; } @@ -883,7 +885,8 @@ int parse_jobs_ini(char *file) if (!td->read_iolog) { td->iolog_file = strdup(tmpbuf); td->write_iolog = 1; - } + } else + fprintf(stderr, "fio: read iolog overrides given write_iolog\n"); fgetpos(f, &off); continue; } -- 2.25.1