Ensure we stop parsing and exit if a command line option fails
authorJens Axboe <axboe@kernel.dk>
Thu, 25 Apr 2013 04:25:22 +0000 (22:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Apr 2013 04:25:22 +0000 (22:25 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
init.c

diff --git a/init.c b/init.c
index ff9b6d432e585e063b82556fca88f764c8f11105..b330925c0067e856d3e9ddbda94d42013139bf45 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1716,6 +1716,8 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                        }
 
                        ret = fio_cmd_option_parse(td, opt, val);
+                       if (ret)
+                               do_exit++;
 
                        if (!ret && !strcmp(opt, "ioengine")) {
                                free_ioengine(td);