summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-12-15 09:53:22 -0700
committerJens Axboe <axboe@fb.com>2015-12-15 09:53:22 -0700
commitc229232543f2ca4c492ea32fe7ca6ee894e543a8 (patch)
tree1a7362c2bb9efd70859493d80f25c45a2663a265 /parse.c
parentb06c3ffa6de4fec544c8788803c56c6c4e916347 (diff)
downloadfio-c229232543f2ca4c492ea32fe7ca6ee894e543a8.tar.gz
fio-c229232543f2ca4c492ea32fe7ca6ee894e543a8.tar.bz2
Rework 'dump_cmdline'
Store the options in &td->opt_list. Should be no change for dump_cmdline, but it will prepare us for being able to jump the job definition as part of the json output. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/parse.c b/parse.c
index e330deae..df42e227 100644
--- a/parse.c
+++ b/parse.c
@@ -978,7 +978,7 @@ int parse_cmd_option(const char *opt, const char *val,
int parse_option(char *opt, const char *input,
struct fio_option *options, struct fio_option **o, void *data,
- int dump_cmdline)
+ struct flist_head *dump_list)
{
char *post;
@@ -1004,17 +1004,16 @@ int parse_option(char *opt, const char *input,
return 1;
}
- if (dump_cmdline) {
- const char *delim;
+ if (dump_list) {
+ struct print_option *p = malloc(sizeof(*p));
- if (!strcmp("description", (*o)->name))
- delim = "\"";
+ p->name = strdup((*o)->name);
+ if (post)
+ p->value = strdup(post);
else
- delim = "";
+ p->value = NULL;
- log_info("--%s%s", (*o)->name, post ? "" : " ");
- if (post)
- log_info("=%s%s%s ", delim, post, delim);
+ flist_add_tail(&p->list, dump_list);
}
return 0;