patches for DPDK stable branches
 help / color / Atom feed
From: Stephen Hemminger <>
To: Sarosh Arif <>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] usertools/ fix dpdk-setup's behaviour on non-alphanumeric inputs
Date: Thu, 19 Mar 2020 08:17:33 -0700
Message-ID: <20200319081733.7c9a6a56@hermes.lan> (raw)
In-Reply-To: <>

On Thu, 19 Mar 2020 18:31:47 +0500
Sarosh Arif <> wrote:

> -	${OPTIONS[our_entry]} ${our_entry}
> +	re='^[0-9]+$'
> +	if  [[ $our_entry =~ $re ]] ; then
> +	${OPTIONS[our_entry]} ${our_entry}
> +	fi
> +

Some comments:
1. Use same indentation style as the rest of the script
   This follows the mantra that all repairs should like
   the original code.
2. If user gives bad data, an error should be printed
   and not silently ignored.
3.The variable "re" doesn't need to be a temporary variable.

4. The [[ construct is a bash only thing, and not used elsewhere
   in the script.

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 13:31 [dpdk-stable] " Sarosh Arif
2020-03-19 15:17 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=20200319081733.7c9a6a56@hermes.lan \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox