examples/pipeline: support hexadecimal argument in CLI
authorChurchill Khangar <churchill.khangar@intel.com>
Wed, 24 Mar 2021 12:22:33 +0000 (08:22 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Mar 2021 17:27:09 +0000 (18:27 +0100)
This patch allows specification of integer arguments for the
CLI commands in hexadecimal and octal as well as decimal.

Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/pipeline/cli.c

index ae06658..ef49eb8 100644 (file)
@@ -55,7 +55,7 @@ parser_read_uint64(uint64_t *value, const char *p)
        if (!isdigit(*p))
                return -EINVAL;
 
-       val = strtoul(p, &next, 10);
+       val = strtoul(p, &next, 0);
        if (p == next)
                return -EINVAL;