From: Jens Axboe Date: Fri, 18 Jun 2010 12:28:53 +0000 (+0200) Subject: parser: match on length of argument, not potential value X-Git-Tag: fio-1.41~5 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7b4cb1320928bdea2360cf36fc45c83700052d43;p=fio.git parser: match on length of argument, not potential value Otherwise we match subset of a string, that doesn't always work well. Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index ad2b1e3c..869bcdad 100644 --- a/parse.c +++ b/parse.c @@ -299,7 +299,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, if (!vp->ival || vp->ival[0] == '\0') continue; all_skipped = 0; - if (!strncmp(vp->ival, ptr, strlen(vp->ival))) { + if (!strncmp(vp->ival, ptr, strlen(ptr))) { ret = 0; if (o->roff1) { if (vp->or)