Signed-off-by: Jens Axboe <axboe@fb.com>
-static void show_closest_option(const char *name)
+static void show_closest_option(const char *opt)
{
int best_option, best_distance;
int i, distance;
{
int best_option, best_distance;
int i, distance;
+ char *name;
+
+ if (!strlen(opt))
+ return;
+
+ name = strdup(opt);
+ i = 0;
+ while (name[i] != '\0' && name[i] != '=')
+ i++;
+ name[i] = '\0';
best_option = -1;
best_distance = INT_MAX;
best_option = -1;
best_distance = INT_MAX;
if (best_option != -1)
log_err("Did you mean %s?\n", fio_options[best_option].name);
if (best_option != -1)
log_err("Did you mean %s?\n", fio_options[best_option].name);
}
int fio_options_parse(struct thread_data *td, char **opts, int num_opts,
}
int fio_options_parse(struct thread_data *td, char **opts, int num_opts,