if (o->type == FIO_OPT_INT) {
if (first) {
if (o->roff1)
- *(unsigned long long *) o->roff1 = ull;
+ *(unsigned int *) o->roff1 = ull;
else
val_store(ilp, ull, o->off1, 0, data);
}
if (!more) {
if (o->roff2)
- *(unsigned long long *) o->roff2 = ull;
+ *(unsigned int *) o->roff2 = ull;
else if (o->off2)
val_store(ilp, ull, o->off2, 0, data);
}
if (first) {
if (o->roff1)
- *(unsigned long *) o->roff1 = ul1;
+ *(unsigned int *) o->roff1 = ul1;
else
val_store(ilp, ul1, o->off1, 0, data);
if (o->roff2)
- *(unsigned long *) o->roff2 = ul2;
+ *(unsigned int *) o->roff2 = ul2;
else
val_store(ilp, ul2, o->off2, 0, data);
}
if (o->roff3 && o->roff4) {
- *(unsigned long *) o->roff3 = ul1;
- *(unsigned long *) o->roff4 = ul2;
+ *(unsigned int *) o->roff3 = ul1;
+ *(unsigned int *) o->roff4 = ul2;
} else if (o->off3 && o->off4) {
val_store(ilp, ul1, o->off3, 0, data);
val_store(ilp, ul2, o->off4, 0, data);
int show_cmd_help(struct fio_option *options, const char *name)
{
struct fio_option *o, *closest;
- unsigned int best_dist;
+ unsigned int best_dist = -1U;
int found = 0;
int show_all = 0;
return 0;
printf("No such command: %s", name);
- if (closest) {
+
+ /*
+ * Only print an appropriately close option, one where the edit
+ * distance isn't too big. Otherwise we get crazy matches.
+ */
+ if (closest && best_dist < 3) {
printf(" - showing closest match\n");
printf("%20s: %s\n", closest->name, closest->help);
show_option_help(closest, stdout);