X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=parse.h;h=5b1a53deb748a1beb61dfce5ae5b62c087b7c2c4;hp=4f3f94d0f7f8f97fef15ead4adc12e7af199db3d;hb=d4c5b195ac12322c943f0fda18e84f067272cc8e;hpb=3b8b7135602a4d3a7132fee10da9c1203ab643ad diff --git a/parse.h b/parse.h index 4f3f94d0..5b1a53de 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, @@ -26,6 +25,7 @@ struct value_pair { const char *help; /* help text for sub option */ }; +#define OPT_LEN_MAX 1024 #define PARSE_MAX_VP 16 /* @@ -48,6 +48,7 @@ struct fio_option { const char *def; /* default setting */ const struct value_pair posval[PARSE_MAX_VP];/* possible values */ const char *parent; /* parent option */ + int (*verify)(struct fio_option *, void *); }; typedef int (str_cb_fn)(void *, char *); @@ -61,7 +62,7 @@ extern void options_init(struct fio_option *); extern void strip_blank_front(char **); extern void strip_blank_end(char *); -extern int str_to_decimal(const char *, long long *, int); +extern int str_to_decimal(const char *, long long *, int, void *); /* * Handlers for the options