Fixes for g++ (4.7.2) following compiler errors when fio.h
gets included (e.g. in an external C++ ioengine):
--8<---
[...]
parse.h:31:6: error: expected unqualified-id before ‘or’ token
[...]
--->8---
Signed-off-by: Daniel Gollub <d.gollub@telekom.de>
Updated by me to apply to recent version, and fix gfio usage
of ->or as well.
Signed-off-by: Jens Axboe <axboe@fb.com>
break;
set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m->checks[i]));
if (set) {
break;
set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m->checks[i]));
if (set) {
val |= vp->oval;
else
val = vp->oval;
val |= vp->oval;
else
val = vp->oval;
{ .ival = "wait_before",
.oval = SYNC_FILE_RANGE_WAIT_BEFORE,
.help = "SYNC_FILE_RANGE_WAIT_BEFORE",
{ .ival = "wait_before",
.oval = SYNC_FILE_RANGE_WAIT_BEFORE,
.help = "SYNC_FILE_RANGE_WAIT_BEFORE",
},
{ .ival = "write",
.oval = SYNC_FILE_RANGE_WRITE,
.help = "SYNC_FILE_RANGE_WRITE",
},
{ .ival = "write",
.oval = SYNC_FILE_RANGE_WRITE,
.help = "SYNC_FILE_RANGE_WRITE",
},
{
.ival = "wait_after",
.oval = SYNC_FILE_RANGE_WAIT_AFTER,
.help = "SYNC_FILE_RANGE_WAIT_AFTER",
},
{
.ival = "wait_after",
.oval = SYNC_FILE_RANGE_WAIT_AFTER,
.help = "SYNC_FILE_RANGE_WAIT_AFTER",
},
},
.type = FIO_OPT_STR_MULTI,
},
},
.type = FIO_OPT_STR_MULTI,
if (!strncmp(vp->ival, ptr, str_match_len(vp, ptr))) {
ret = 0;
if (o->off1)
if (!strncmp(vp->ival, ptr, str_match_len(vp, ptr))) {
ret = 0;
if (o->off1)
- val_store(ilp, vp->oval, o->off1, vp->or, data, o);
+ val_store(ilp, vp->oval, o->off1, vp->orval, data, o);
const char *ival; /* string option */
unsigned int oval; /* output value */
const char *help; /* help text for sub option */
const char *ival; /* string option */
unsigned int oval; /* output value */
const char *help; /* help text for sub option */
+ int orval; /* OR value */
void *cb; /* sub-option callback */
};
void *cb; /* sub-option callback */
};