From: Jens Axboe Date: Tue, 20 Mar 2007 13:28:34 +0000 (+0100) Subject: Warn if default value is given for string option without value X-Git-Tag: fio-1.15~62 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0f3e35efd9f63ad1a504a7d09fdf12bb3ece13f9 Warn if default value is given for string option without value That would not make sense, as the option would then always be set and there would be no way to unset it. Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index 4d8e95db..57865b11 100644 --- a/parse.c +++ b/parse.c @@ -625,6 +625,8 @@ void options_init(struct fio_option *options) o->minval = 0; o->maxval = 1; } + if (o->type == FIO_OPT_STR_SET && o->def) + fprintf(stderr, "Option %s: string set option with default will always be true\n", o->name); if (!o->cb && !o->off1) fprintf(stderr, "Option %s: neither cb nor offset given\n", o->name); if (o->type == FIO_OPT_STR || o->type == FIO_OPT_STR_STORE)