dprint(FD_PARSE, "__handle_option=%s, type=%d, ptr=%s\n", o->name,
o->type, ptr);
- if (!ptr && o->type != FIO_OPT_STR_SET) {
+ if (!ptr && o->type != FIO_OPT_STR_SET && o->type != FIO_OPT_STR) {
fprintf(stderr, "Option %s requires an argument\n", o->name);
return 1;
}
*ret = '\0';
ret = (char *) opt;
(*post)++;
+ strip_blank_end(ret);
o = find_option(options, ret);
} else {
o = find_option(options, opt);
o = find_option(options, opt);
if (!o) {
- fprintf(stderr, "Bad option %s\n", opt);
+ fprintf(stderr, "Bad option <%s>\n", opt);
return 1;
}
o = get_option(tmp, options, &post);
if (!o) {
- fprintf(stderr, "Bad option %s\n", tmp);
+ fprintf(stderr, "Bad option <%s>\n", tmp);
free(tmp);
return 1;
}