struct gopt_str_val *g;
if (o->off1)
- ullp = td_var(to, o->off1);
+ ullp = td_var(to, o, o->off1);
g = container_of(gopt, struct gopt_str_val, gopt);
if (ullp)
struct gopt_int *i;
if (o->off1)
- ullp = td_var(to, o->off1);
+ ullp = td_var(to, o, o->off1);
i = container_of(gopt, struct gopt_int, gopt);
if (ullp)
struct gopt_combo *c;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
c = container_of(gopt, struct gopt_combo, gopt);
if (ip)
struct gopt_int *i;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
i = container_of(gopt, struct gopt_int, gopt);
if (ip)
struct gopt_bool *b;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
b = container_of(gopt, struct gopt_bool, gopt);
if (ip)
struct gopt_combo *c;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
c = container_of(gopt, struct gopt_combo, gopt);
if (ip)
char *text = NULL;
if (o->off1) {
- char **p = td_var(to, o->off1);
+ char **p = td_var(to, o, o->off1);
text = *p;
}
char *text = NULL;
if (o->off1) {
- char **p = td_var(to, o->off1);
+ char **p = td_var(to, o, o->off1);
text = *p;
}
break;
case FIO_OPT_RANGE: {
struct gopt_range *r;
- unsigned int *ip[4] = { td_var(to, o->off1),
- td_var(to, o->off2),
- td_var(to, o->off3),
- td_var(to, o->off4) };
+ unsigned int *ip[4] = { td_var(to, o, o->off1),
+ td_var(to, o, o->off2),
+ td_var(to, o, o->off3),
+ td_var(to, o, o->off4) };
r = container_of(gopt, struct gopt_range, gopt);
gopt_int_range_set_val(r, *ip);
unsigned long long *ullp = NULL;
if (o->off1)
- ullp = td_var(to, o->off1);
+ ullp = td_var(to, o, o->off1);
go = gopt_new_str_val(gjv, o, ullp, opt_index);
break;
unsigned long long *ullp = NULL;
if (o->off1)
- ullp = td_var(to, o->off1);
+ ullp = td_var(to, o, o->off1);
go = gopt_new_ullong(gjv, o, ullp, opt_index);
break;
unsigned int *ip = NULL;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
go = gopt_new_combo_int(gjv, o, ip, opt_index);
} else {
unsigned int *ip = NULL;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
go = gopt_new_int(gjv, o, ip, opt_index);
}
unsigned int *ip = NULL;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
go = gopt_new_bool(gjv, o, ip, opt_index);
break;
unsigned int *ip = NULL;
if (o->off1)
- ip = td_var(to, o->off1);
+ ip = td_var(to, o, o->off1);
go = gopt_new_combo_int(gjv, o, ip, opt_index);
} else {
char *text = NULL;
if (o->off1) {
- char **p = td_var(to, o->off1);
+ char **p = td_var(to, o, o->off1);
text = *p;
}
go = gopt_new_str_multi(gjv, o, opt_index);
break;
case FIO_OPT_RANGE: {
- unsigned int *ip[4] = { td_var(to, o->off1),
- td_var(to, o->off2),
- td_var(to, o->off3),
- td_var(to, o->off4) };
+ unsigned int *ip[4] = { td_var(to, o, o->off1),
+ td_var(to, o, o->off2),
+ td_var(to, o, o->off3),
+ td_var(to, o, o->off4) };
go = gopt_new_int_range(gjv, o, ip, opt_index);
break;
struct gopt_str_multi *m,
struct fio_option *o)
{
- unsigned int *ip = td_var(gjv->o, o->off1);
+ unsigned int *ip = td_var(gjv->o, o, o->off1);
struct value_pair *vp;
gboolean set;
guint val = 0;
break;
set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m->checks[i]));
if (set) {
- if (vp->or)
+ if (vp->orval)
val |= vp->oval;
else
val = vp->oval;
struct gopt_range *r,
struct fio_option *o)
{
- unsigned int *ip[4] = { td_var(gjv->o, o->off1),
- td_var(gjv->o, o->off2),
- td_var(gjv->o, o->off3),
- td_var(gjv->o, o->off4) };
+ unsigned int *ip[4] = { td_var(gjv->o, o, o->off1),
+ td_var(gjv->o, o, o->off2),
+ td_var(gjv->o, o, o->off3),
+ td_var(gjv->o, o, o->off4) };
gint val;
int i;
struct gopt_str_val *s,
struct fio_option *o)
{
- unsigned long long *ullp = td_var(gjv->o, o->off1);
+ unsigned long long *ullp = td_var(gjv->o, o, o->off1);
GtkAdjustment *adj;
gint index;
static void gopt_handle_str_changed(struct gopt_job_view *gjv,
struct gopt_str *s, struct fio_option *o)
{
- char **p = td_var(gjv->o, o->off1);
+ char **p = td_var(gjv->o, o, o->off1);
if (*p)
free(*p);
static void gopt_handle_bool_changed(struct gopt_job_view *gjv,
struct gopt_bool *b, struct fio_option *o)
{
- unsigned int *ip = td_var(gjv->o, o->off1);
+ unsigned int *ip = td_var(gjv->o, o, o->off1);
gboolean set;
set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(b->check));
static void gopt_handle_int_changed(struct gopt_job_view *gjv,
struct gopt_int *i, struct fio_option *o)
{
- unsigned int *ip = td_var(gjv->o, o->off1);
+ unsigned int *ip = td_var(gjv->o, o, o->off1);
GtkAdjustment *adj;
guint val;
struct gopt_combo *c,
struct fio_option *o)
{
- char **p = td_var(gjv->o, o->off1);
+ char **p = td_var(gjv->o, o, o->off1);
if (*p)
free(*p);
struct gopt_combo *c,
struct fio_option *o)
{
- unsigned int *ip = td_var(gjv->o, o->off1);
+ unsigned int *ip = td_var(gjv->o, o, o->off1);
gint index;
index = gtk_combo_box_get_active(GTK_COMBO_BOX(c->combo));
goto done;
while (!flist_empty(&gjv->changed_list)) {
- gopt = flist_entry(gjv->changed_list.next, struct gopt, changed_list);
+ gopt = flist_first_entry(&gjv->changed_list, struct gopt, changed_list);
flist_del_init(&gopt->changed_list);
}
gjv = calloc(1, sizeof(*gjv));
INIT_FLIST_HEAD(&gjv->changed_list);
- gco = flist_entry(gc->o_list.next, struct gfio_client_options, list);
+ gco = flist_first_entry(&gc->o_list, struct gfio_client_options, list);
gjv->o = &gco->o;
gjv->dialog = dialog;
gjv->client = gc;