Allow upper-case 'X' for hexidecimal in parser
authorJens Axboe <jens.axboe@oracle.com>
Fri, 10 Aug 2007 12:03:20 +0000 (14:03 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 10 Aug 2007 12:03:20 +0000 (14:03 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
parse.c

diff --git a/parse.c b/parse.c
index b40d51c754d76c3d87b62c72ce89adee7f7a8b13..879a3aa3c5b190bf63b37dd4b7f90f2be2fd5f83 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -188,7 +188,7 @@ static int check_int(const char *p, int *val)
 {
        if (!strlen(p))
                return 1;
-       if (strstr(p, "0x")) {
+       if (strstr(p, "0x") || strstr(p, "0X")) {
                if (sscanf(p, "%x", val) == 1)
                        return 0;
        } else {