[PATCH] Broken write_iolog option if iolog given
authorJens Axboe <axboe@suse.de>
Wed, 7 Jun 2006 20:33:17 +0000 (22:33 +0200)
committerJens Axboe <axboe@suse.de>
Wed, 7 Jun 2006 20:33:17 +0000 (22:33 +0200)
We don't want to reject the option as bad, just ignore it.

init.c

diff --git a/init.c b/init.c
index 1fc694d373a7ce60d5e74431ecc282cfb7e93b69..037dd3167f2b47e58e3fae7d6bc6644975eaf3ff 100644 (file)
--- a/init.c
+++ b/init.c
@@ -871,16 +871,19 @@ int parse_jobs_ini(char *file)
                                continue;
                        }
                        if (!check_strstore(p, "iolog", tmpbuf)) {
+                               if (td->iolog_file)
+                                       free(td->iolog_file);
                                td->iolog_file = strdup(tmpbuf);
                                td->read_iolog = 1;
                                td->write_iolog = 0;
                                fgetpos(f, &off);
                                continue;
                        }
-                       if (!td->read_iolog &&
-                           !check_strstore(p, "write_iolog", tmpbuf)) {
-                               td->iolog_file = strdup(tmpbuf);
-                               td->write_iolog = 1;
+                       if (!check_strstore(p, "write_iolog", tmpbuf)) {
+                               if (!td->read_iolog) {
+                                       td->iolog_file = strdup(tmpbuf);
+                                       td->write_iolog = 1;
+                               }
                                fgetpos(f, &off);
                                continue;
                        }