0011-scripts-do-not-compare-strings-with-regexp-expressio.patch 831 B

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