From: Jens Axboe Date: Mon, 7 Apr 2008 07:26:02 +0000 (+0200) Subject: Mark rwmixcycle option as deprecated in the option parser X-Git-Tag: fio-1.20-rc4~3 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=15ca150e8dbfd68aa5beb479fcb3f07447417a04;hp=613442dc8e6699efac7d10a36c2dae875094d06c Mark rwmixcycle option as deprecated in the option parser Signed-off-by: Jens Axboe --- diff --git a/options.c b/options.c index 20549edf..8a6a4338 100644 --- a/options.c +++ b/options.c @@ -988,11 +988,7 @@ static struct fio_option options[] = { }, { .name = "rwmixcycle", - .type = FIO_OPT_INT, - .off1 = td_var_offset(rwmixcycle), - .help = "Cycle period for mixed read/write workloads (msec)", - .def = "500", - .parent = "rwmixread", + .type = FIO_OPT_DEPRECATED, }, { .name = "nice", diff --git a/parse.c b/parse.c index 8e29fabf..ca78f904 100644 --- a/parse.c +++ b/parse.c @@ -410,6 +410,9 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, } break; } + case FIO_OPT_DEPRECATED: + fprintf(stdout, "Option %s is deprecated\n", o->name); + break; default: fprintf(stderr, "Bad option type %u\n", o->type); ret = 1; @@ -644,6 +647,9 @@ int show_cmd_help(struct fio_option *options, const char *name) for (o = &options[0]; o->name; o++) { int match = 0; + if (o->type == FIO_OPT_DEPRECATED) + continue; + if (name) { if (!strcmp(name, o->name) || (o->alias && !strcmp(name, o->alias))) @@ -715,6 +721,8 @@ void options_init(struct fio_option *options) dprint(FD_PARSE, "init options\n"); for (o = &options[0]; o->name; o++) { + if (o->type == FIO_OPT_DEPRECATED) + continue; if (o->type == FIO_OPT_BOOL) { o->minval = 0; o->maxval = 1; diff --git a/parse.h b/parse.h index 42046b5e..4e8124f8 100644 --- a/parse.h +++ b/parse.h @@ -14,6 +14,7 @@ enum fio_opt_type { FIO_OPT_INT, FIO_OPT_BOOL, FIO_OPT_STR_SET, + FIO_OPT_DEPRECATED, }; /*