4 #define FIO_MAX_OPTS 512
10 #include "lib/types.h"
12 #define td_var_offset(var) ((size_t) &((struct thread_options *)0)->var)
14 int add_option(struct fio_option *);
15 void invalidate_profile_options(const char *);
16 extern char *exec_profile;
18 void add_opt_posval(const char *, const char *, const char *);
19 void del_opt_posval(const char *, const char *);
21 void fio_options_free(struct thread_data *);
22 char *get_name_idx(char *, int);
23 int set_name_idx(char *, size_t, char *, int, bool);
25 extern char client_sockaddr_str[]; /* used with --client option */
27 extern struct fio_option fio_options[FIO_MAX_OPTS];
29 extern bool __fio_option_is_set(struct thread_options *, unsigned int off);
31 #define fio_option_is_set(__td, name) \
33 const unsigned int off = td_var_offset(name); \
34 bool __r = __fio_option_is_set((__td), off); \
38 extern void fio_option_mark_set(struct thread_options *, struct fio_option *);
40 static inline bool o_match(struct fio_option *o, const char *opt)
42 if (!strcmp(o->name, opt))
44 else if (o->alias && !strcmp(o->alias, opt))
50 extern struct fio_option *find_option(struct fio_option *, const char *);
51 extern struct fio_option *fio_option_find(const char *);
52 extern unsigned int fio_get_kb_base(void *);