From 588b7f09161ff432777de4cf9c3345b6f976ad98 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 19 Mar 2012 20:37:41 +0100 Subject: [PATCH] gfio: fill default options on new job Signed-off-by: Jens Axboe --- gfio.c | 1 + init.c | 5 +++++ thread_options.h | 1 + 3 files changed, 7 insertions(+) diff --git a/gfio.c b/gfio.c index 827133e1..d62b8a5b 100644 --- a/gfio.c +++ b/gfio.c @@ -2070,6 +2070,7 @@ static void gfio_client_added(struct gui_entry *ge, struct fio_client *client) gc = malloc(sizeof(*gc)); memset(gc, 0, sizeof(*gc)); + options_default_fill(&gc->o); gc->ge = ge; gc->client = fio_get_client(client); diff --git a/init.c b/init.c index eccd3afe..0f992803 100644 --- a/init.c +++ b/init.c @@ -1708,3 +1708,8 @@ int parse_options(int argc, char *argv[]) return 0; } + +void options_default_fill(struct thread_options *o) +{ + memcpy(o, &def_thread.o, sizeof(*o)); +} diff --git a/thread_options.h b/thread_options.h index 6a8fee72..51ac0908 100644 --- a/thread_options.h +++ b/thread_options.h @@ -415,5 +415,6 @@ struct thread_options_pack { extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top); extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *); extern int fio_test_cconv(struct thread_options *); +extern void options_default_fill(struct thread_options *o); #endif -- 2.25.1