From: Jens Axboe Date: Tue, 13 Mar 2007 10:18:57 +0000 (+0100) Subject: Strip blank end/front of filenames X-Git-Tag: fio-1.14~22 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=e13363ebdb9d676f2fcb6e8673335557e6ce8782 Strip blank end/front of filenames We do this for other options. Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index ba932bf3..888e68b6 100644 --- a/init.c +++ b/init.c @@ -1111,7 +1111,13 @@ static int str_filename_cb(void *data, const char *input) td->nr_files = 0; p = str = strdup(input); + + strip_blank_front(&str); + strip_blank_end(str); + while ((fname = strsep(&str, ":")) != NULL) { + if (!strlen(fname)) + break; add_file(td, fname); td->nr_files++; }