From e01b22b8fe3f20376fe8fdc6f2c28cc3682d698e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 9 Jun 2009 15:43:25 +0200 Subject: [PATCH] parser: get rid of FIO_OPT_STR_VAL_INT It's treated the same as FIO_OPT_INT since we got rid of the int vs siint distinction. Signed-off-by: Jens Axboe --- options.c | 18 +++++++++--------- parse.c | 6 ++---- parse.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/options.c b/options.c index b2dd4de6..b65def9a 100644 --- 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 c2d744b3..1071d403 100644 --- 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 45462596..0cdc0894 100644 --- 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, -- 2.25.1