[PATCH] init: fix exit status with bogus arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Had been exiting "successfully" on invalid command-line arguments.

Signed-off-by: Zev Weiss <zev@xxxxxxxxxxxxxxxxx>
---
 init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/init.c b/init.c
index 7aedf2b..95e26b8 100644
--- a/init.c
+++ b/init.c
@@ -2135,6 +2135,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 						td = NULL;
 					}
 					do_exit++;
+					exit_val = 1;
 					break;
 				}
 				fio_options_set_ioengine_opts(l_opts, td);
@@ -2153,6 +2154,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 					td = NULL;
 				}
 				do_exit++;
+				exit_val = 1;
 			}
 
 			if (!ret && !strcmp(opt, "ioengine")) {
@@ -2161,6 +2163,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 					put_job(td);
 					td = NULL;
 					do_exit++;
+					exit_val = 1;
 					break;
 				}
 				fio_options_set_ioengine_opts(l_opts, td);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux