lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486475452-39214-4-git-send-email-yotamg@mellanox.com>
Date:   Tue,  7 Feb 2017 15:50:50 +0200
From:   Yotam Gigi <yotamg@...lanox.com>
To:     netdev@...r.kernel.org, stephen@...workplumber.org,
        eladr@...lanox.com, idosch@...lanox.com, jiri@...lanox.com,
        jhs@...atatu.com, mrv@...atatu.com
Cc:     Yotam Gigi <yotamg@...lanox.com>
Subject: [PATCH net-next/iproute v2 3/5] tc: bash-completion: Make the *_KIND variables global

The QDISC_KIND, FILTER_KIND, ACTION_KIND variables may be used by other
routines, thus make them global variables.

Signed-off-by: Yotam Gigi <yotamg@...lanox.com>
---
 bash-completion/tc | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/bash-completion/tc b/bash-completion/tc
index c854dc0..e23f69c 100644
--- a/bash-completion/tc
+++ b/bash-completion/tc
@@ -2,6 +2,12 @@
 # Copyright 2016 6WIND S.A.
 # Copyright 2016 Quentin Monnet <quentin.monnet@...nd.com>
 
+QDISC_KIND=' choke codel bfifo pfifo pfifo_head_drop fq fq_codel gred hhf \
+            mqprio multiq netem pfifo_fast pie red rr sfb sfq tbf atm cbq drr \
+            dsmark hfsc htb prio qfq '
+FILTER_KIND=' basic bpf cgroup flow flower fw route rsvp tcindex u32 '
+ACTION_KIND=' gact mirred bpf sample '
+
 # Takes a list of words in argument; each one of them is added to COMPREPLY if
 # it is not already present on the command line. Returns no value.
 _tc_once_attr()
@@ -605,10 +611,7 @@ _tc()
                         COMPREPLY=( $( compgen -W 'dev' -- "$cur" ) )
                         return 0
                     fi
-                    local qdisc qdwd QDISC_KIND=' choke codel bfifo pfifo \
-                        pfifo_head_drop fq fq_codel gred hhf mqprio multiq \
-                        netem pfifo_fast pie red rr sfb sfq tbf atm cbq drr \
-                        dsmark hfsc htb prio qfq '
+                    local qdisc qdwd
                     for ((qdwd=$subcword; qdwd < ${#words[@]}-1; qdwd++)); do
                         if [[ $QDISC_KIND =~ ' '${words[qdwd]}' ' ]]; then
                             qdisc=${words[qdwd]}
@@ -643,10 +646,7 @@ _tc()
                         COMPREPLY=( $( compgen -W 'dev' -- "$cur" ) )
                         return 0
                     fi
-                    local qdisc qdwd QDISC_KIND=' choke codel bfifo pfifo \
-                        pfifo_head_drop fq fq_codel gred hhf mqprio multiq \
-                        netem pfifo_fast pie red rr sfb sfq tbf atm cbq drr \
-                        dsmark hfsc htb prio qfq '
+                    local qdisc qdwd
                     for ((qdwd=$subcword; qdwd < ${#words[@]}-1; qdwd++)); do
                         if [[ $QDISC_KIND =~ ' '${words[qdwd]}' ' ]]; then
                             qdisc=${words[qdwd]}
@@ -681,8 +681,7 @@ _tc()
                         COMPREPLY=( $( compgen -W 'dev' -- "$cur" ) )
                         return 0
                     fi
-                    local filter fltwd FILTER_KIND=' basic bpf cgroup flow \
-                        flower fw route rsvp tcindex u32 '
+                    local filter fltwd
                     for ((fltwd=$subcword; fltwd < ${#words[@]}-1; fltwd++));
                     do
                         if [[ $FILTER_KIND =~ ' '${words[fltwd]}' ' ]]; then
@@ -714,7 +713,7 @@ _tc()
         action)
             case $subcmd in
                 add|change|replace)
-                    local action acwd ACTION_KIND=' gact mirred bpf sample '
+                    local action acwd
                     for ((acwd=$subcword; acwd < ${#words[@]}-1; acwd++)); do
                         if [[ $ACTION_KIND =~ ' '${words[acwd]}' ' ]]; then
                             _tc_action_options $acwd && return 0
-- 
2.4.11

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ