layerscape: update build guide in README
[oweals/openwrt.git] / package / network / utils / layerscape / restool / patches / 0011-scripts-do-not-compare-strings-with-regexp-expressio.patch
1 From 6af86a65f2dcfd42f572e04207eef45da3573b92 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Wed, 25 Oct 2017 11:30:33 +0000
4 Subject: [PATCH 11/12] scripts: do not compare strings with regexp expressions
5
6 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
7 ---
8  scripts/ls-main | 3 ++-
9  1 file changed, 2 insertions(+), 1 deletion(-)
10
11 diff --git a/scripts/ls-main b/scripts/ls-main
12 index 0dcd2fa..526c052 100755
13 --- a/scripts/ls-main
14 +++ b/scripts/ls-main
15 @@ -805,7 +805,8 @@ process_addni() {
16         fi
17  
18         # if no --num-queues is specified then set it to number of cores
19 -       if [[ $dpni_args != *"--num-queues"* ]]; then
20 +       num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true)
21 +       if [[ -z "$num_queues_present" ]]; then
22                 dpni_args=$dpni_args" --num-queues="$(nproc)
23         fi
24  
25 -- 
26 2.14.1
27