FIO_OPT_STR_SET,
};
+/*
+ * Match a possible value string with the integer option.
+ */
+struct value_pair {
+ const char *ival; /* string option */
+ unsigned int oval; /* output value */
+};
+
+#define PARSE_MAX_VP 16
+
/*
* Option define
*/
void *cb; /* callback */
const char *help; /* help text for option */
const char *def; /* default setting */
- const char *posval[16]; /* possible values */
+ const struct value_pair posval[PARSE_MAX_VP];/* possible values */
};
typedef int (str_cb_fn)(void *, char *);
#define td_var(start, offset) ((void *) start + (offset))
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef max
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
#endif