/*
* Option grouping
*/
-static struct opt_group fio_opt_groups[] = {
+static const struct opt_group fio_opt_groups[] = {
{
.name = "General",
.mask = FIO_OPT_C_GENERAL,
},
};
-static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
- unsigned int inv_mask)
+static const struct opt_group *group_from_mask(const struct opt_group *ogs,
+ uint64_t *mask,
+ uint64_t inv_mask)
{
- struct opt_group *og;
int i;
if (*mask == inv_mask || !*mask)
return NULL;
for (i = 0; ogs[i].name; i++) {
- og = &ogs[i];
+ const struct opt_group *og = &ogs[i];
if (*mask & og->mask) {
*mask &= ~(og->mask);
return NULL;
}
-struct opt_group *opt_group_from_mask(unsigned int *mask)
+const struct opt_group *opt_group_from_mask(uint64_t *mask)
{
- return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
+ return group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
}
-static struct opt_group fio_opt_cat_groups[] = {
+static const struct opt_group fio_opt_cat_groups[] = {
{
.name = "Latency profiling",
.mask = FIO_OPT_G_LATPROF,
}
};
-struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
+const struct opt_group *opt_group_cat_from_mask(uint64_t *mask)
{
- return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
+ return group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
}
/*
.category = FIO_OPT_C_GENERAL,
.group = FIO_OPT_G_DESC,
},
+ {
+ .name = "wait_for",
+ .lname = "Waitee name",
+ .type = FIO_OPT_STR_STORE,
+ .off1 = td_var_offset(wait_for),
+ .help = "Name of the job this one wants to wait for before starting",
+ .category = FIO_OPT_C_GENERAL,
+ .group = FIO_OPT_G_DESC,
+ },
{
.name = "filename",
.lname = "Filename(s)",
return (o->set_options[index] & ((uint64_t)1 << offset)) != 0;
}
-int __fio_option_is_set(struct thread_options *o, unsigned int off1)
+bool __fio_option_is_set(struct thread_options *o, unsigned int off1)
{
struct fio_option *opt, *next;
next = NULL;
while ((opt = find_next_opt(o, next, off1)) != NULL) {
if (opt_is_set(o, opt))
- return 1;
+ return true;
next = opt;
}
- return 0;
+ return false;
}
void fio_option_mark_set(struct thread_options *o, struct fio_option *opt)