Mark rwmixcycle option as deprecated in the option parser
authorJens Axboe <jens.axboe@oracle.com>
Mon, 7 Apr 2008 07:26:02 +0000 (09:26 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 7 Apr 2008 07:26:02 +0000 (09:26 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c
parse.c
parse.h

index 20549edfe5ebbadfdc64efabf9700c0bffc74d3e..8a6a433833582552983ffadf4b2d9e596aa514d5 100644 (file)
--- 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 8e29fabf8e64e87129d900fea6300a9b80a5daa7..ca78f904dd0bd7ef97897fa10446e73ad6fb3279 100644 (file)
--- 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 42046b5e96d25047889295c3113ab6d82069b5d7..4e8124f853b3fa9a36f1c884416d48a4a971b78a 100644 (file)
--- 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,
 };
 
 /*