}
int parse_option(char *opt, const char *input,
- struct fio_option *options, struct fio_option **o, void *data)
+ struct fio_option *options, struct fio_option **o, void *data,
+ int dump_cmdline)
{
char *post;
return 1;
}
- if (!handle_option(*o, post, data))
- return 0;
+ if (handle_option(*o, post, data)) {
+ log_err("fio: failed parsing %s\n", input);
+ return 1;
+ }
- log_err("fio: failed parsing %s\n", input);
- return 1;
+ if (dump_cmdline) {
+ const char *delim;
+
+ if (!strcmp("description", (*o)->name))
+ delim = "\"";
+ else
+ delim = "";
+
+ log_info("--%s%s", (*o)->name, post ? "" : " ");
+ if (post)
+ log_info("=%s%s%s ", delim, post, delim);
+ }
+
+ return 0;
}
/*