[PATCH] fio: strip whitespace at the end as well in check_strstore()
authorJens Axboe <axboe@suse.de>
Wed, 9 Nov 2005 10:56:40 +0000 (11:56 +0100)
committerJens Axboe <axboe@suse.de>
Wed, 9 Nov 2005 10:56:40 +0000 (11:56 +0100)
fio.c

diff --git a/fio.c b/fio.c
index 17db50744d498ebd6a6d15742ed11e76c51d39d6..0cc891479ae173150e3a07efa2e6d4fc9d39484d 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -2007,6 +2007,13 @@ static int check_strstore(char *p, char *name, char *dest)
                s++;
 
        strcpy(dest, s);
+
+       s = dest + strlen(dest) - 1;
+       while (isblank(*s)) {
+               *s = '\0';
+               s--;
+       }
+
        return 0;
 }