parser: get rid of FIO_OPT_STR_VAL_INT
authorJens Axboe <jens.axboe@oracle.com>
Tue, 9 Jun 2009 13:43:25 +0000 (15:43 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 9 Jun 2009 13:43:25 +0000 (15:43 +0200)
It's treated the same as FIO_OPT_INT since we got rid of the
int vs siint distinction.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c
parse.c
parse.h

index b2dd4de6f9202f44454c0e38ec6a8d20337547a8..b65def9a2adcc543526ce773c08f979411a96401 100644 (file)
--- a/options.c
+++ b/options.c
@@ -813,7 +813,7 @@ static struct fio_option options[] = {
        {
                .name   = "bs",
                .alias  = "blocksize",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(bs[DDIR_READ]),
                .off2   = td_var_offset(bs[DDIR_WRITE]),
                .minval = 1,
@@ -824,7 +824,7 @@ static struct fio_option options[] = {
        {
                .name   = "ba",
                .alias  = "blockalign",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(ba[DDIR_READ]),
                .off2   = td_var_offset(ba[DDIR_WRITE]),
                .minval = 1,
@@ -1105,7 +1105,7 @@ static struct fio_option options[] = {
        },
        {
                .name   = "verify_interval",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(verify_interval),
                .minval = 2 * sizeof(struct verify_header),
                .help   = "Store verify buffer header every N bytes",
@@ -1113,7 +1113,7 @@ static struct fio_option options[] = {
        },
        {
                .name   = "verify_offset",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .help   = "Offset verify header location by N bytes",
                .def    = "0",
                .cb     = str_verify_offset_cb,
@@ -1259,14 +1259,14 @@ static struct fio_option options[] = {
        },
        {
                .name   = "rate",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(rate[0]),
                .off2   = td_var_offset(rate[1]),
                .help   = "Set bandwidth rate",
        },
        {
                .name   = "ratemin",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(ratemin[0]),
                .off2   = td_var_offset(ratemin[1]),
                .help   = "Job must meet this rate or it will be shutdown",
@@ -1274,14 +1274,14 @@ static struct fio_option options[] = {
        },
        {
                .name   = "rate_iops",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(rate_iops[0]),
                .off2   = td_var_offset(rate_iops[1]),
                .help   = "Limit IO used to this number of IO operations/sec",
        },
        {
                .name   = "rate_iops_min",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(rate_iops_min[0]),
                .off2   = td_var_offset(rate_iops_min[1]),
                .help   = "Job must meet this rate or it will be shutdown",
@@ -1435,7 +1435,7 @@ static struct fio_option options[] = {
        },
        {
                .name   = "hugepage-size",
-               .type   = FIO_OPT_STR_VAL_INT,
+               .type   = FIO_OPT_INT,
                .off1   = td_var_offset(hugepage_size),
                .help   = "When using hugepages, specify size of each page",
                .def    = __stringify(FIO_HUGE_PAGE),
diff --git a/parse.c b/parse.c
index c2d744b3088f5a4d74f1e94e9ea9631f9b2859e4..1071d4031693449fe165fc1852edad4596ee9d91 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -278,8 +278,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
        case FIO_OPT_STR_VAL_TIME:
                is_time = 1;
        case FIO_OPT_INT:
-       case FIO_OPT_STR_VAL:
-       case FIO_OPT_STR_VAL_INT: {
+       case FIO_OPT_STR_VAL: {
                fio_opt_str_val_fn *fn = o->cb;
 
                if (is_time)
@@ -304,8 +303,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                if (fn)
                        ret = fn(data, &ull);
                else {
-                       if (o->type == FIO_OPT_STR_VAL_INT ||
-                           o->type == FIO_OPT_INT) {
+                       if (o->type == FIO_OPT_INT) {
                                if (first)
                                        val_store(ilp, ull, o->off1, data);
                                if (!more && o->off2)
diff --git a/parse.h b/parse.h
index 45462596ca4246dd6a7b4eac7600a2936c241b81..0cdc0894ae207be6f674c8ca963462c7af423b7f 100644 (file)
--- a/parse.h
+++ b/parse.h
@@ -7,7 +7,6 @@
 enum fio_opt_type {
        FIO_OPT_STR = 0,
        FIO_OPT_STR_VAL,
-       FIO_OPT_STR_VAL_INT,
        FIO_OPT_STR_VAL_TIME,
        FIO_OPT_STR_STORE,
        FIO_OPT_RANGE,