DPDK patches and discussions
 help / color / mirror / Atom feed
From: Churchill Khangar <churchill.khangar@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com,
	churchill.khangar@intel.com, yogesh.jangra@intel.com
Subject: [dpdk-dev] [PATCH v2] examples/pipeline: support CLI hex args
Date: Wed, 24 Mar 2021 08:22:33 -0400	[thread overview]
Message-ID: <1616588553-47065-1-git-send-email-churchill.khangar@intel.com> (raw)
In-Reply-To: <1614957330-9469-1-git-send-email-churchill.khangar@intel.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
index ae06658..ef49eb8 100644
--- a/examples/pipeline/cli.c
+++ b/examples/pipeline/cli.c
@@ -55,7 +55,7 @@
 	if (!isdigit(*p))
 		return -EINVAL;
 
-	val = strtoul(p, &next, 10);
+	val = strtoul(p, &next, 0);
 	if (p == next)
 		return -EINVAL;
 
-- 
1.8.3.1


  parent reply	other threads:[~2021-03-24 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 15:15 [dpdk-dev] [PATCH] examples/pipeline: fix strtoul base Churchill Khangar
2021-03-24  9:05 ` Thomas Monjalon
2021-03-24 10:41   ` Dumitrescu, Cristian
2021-03-24 12:22 ` Churchill Khangar [this message]
2021-03-24 12:31   ` [dpdk-dev] [PATCH v2] examples/pipeline: support CLI hex args David Marchand
2021-03-24 12:52     ` Dumitrescu, Cristian
2021-03-24 17:25   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1616588553-47065-1-git-send-email-churchill.khangar@intel.com \
    --to=churchill.khangar@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=venkata.suresh.kumar.p@intel.com \
    --cc=yogesh.jangra@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).