man: sync "JOB FILE FORMAT" section with HOWTO
[fio.git] / options.h
CommitLineData
9f988e2e
JA
1#ifndef FIO_OPTION_H
2#define FIO_OPTION_H
3
07b3232d
JA
4#define FIO_MAX_OPTS 512
5
f5b6bb85 6#include <string.h>
72f39748 7#include <inttypes.h>
9f988e2e
JA
8#include "parse.h"
9#include "flist.h"
72f39748 10#include "lib/types.h"
9f988e2e 11
07b3232d
JA
12int add_option(struct fio_option *);
13void invalidate_profile_options(const char *);
14extern char *exec_profile;
9f988e2e 15
f5b6bb85
JA
16void add_opt_posval(const char *, const char *, const char *);
17void del_opt_posval(const char *, const char *);
7e356b2d
JA
18struct thread_data;
19void fio_options_free(struct thread_data *);
922a5be8 20int set_name_idx(char *, size_t, char *, int, bool);
f5b6bb85 21
e13c3b50 22extern char client_sockaddr_str[]; /* used with --client option */
72a703da 23
9af4a244
JA
24extern struct fio_option fio_options[FIO_MAX_OPTS];
25
72f39748 26extern bool __fio_option_is_set(struct thread_options *, unsigned int off);
a8523a6a 27
2243dfc7
JA
28#define fio_option_is_set(__td, name) \
29({ \
a609f12a 30 const unsigned int off = offsetof(struct thread_options, name); \
72f39748 31 bool __r = __fio_option_is_set((__td), off); \
2243dfc7
JA
32 __r; \
33})
a8523a6a
JA
34
35extern void fio_option_mark_set(struct thread_options *, struct fio_option *);
36
72f39748 37static inline bool o_match(struct fio_option *o, const char *opt)
f5b6bb85
JA
38{
39 if (!strcmp(o->name, opt))
72f39748 40 return true;
f5b6bb85 41 else if (o->alias && !strcmp(o->alias, opt))
72f39748 42 return true;
f5b6bb85 43
72f39748 44 return false;
f5b6bb85
JA
45}
46
75e6bcba
JA
47extern struct fio_option *find_option(struct fio_option *, const char *);
48extern struct fio_option *fio_option_find(const char *);
3c3ed070 49extern unsigned int fio_get_kb_base(void *);
9af4a244 50
9f988e2e 51#endif