Skip to contentSkip to conversation

tools/hotplug: quote all variables in vif-bridge

PATCH In review Olaf Hering 2 participants 2 messages Nov 19, 2015 – Nov 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/hotplug: quote all variables in vif-bridge

Cosmetics: most of the variables used in vif-bridge are already quoted. Add quoting also to the remaining shell variables.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 tools/hotplug/Linux/vif-bridge | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/hotplug/Linux/vif-bridge +3 -3
index 3d72ca4..6956dea 100644
@@ -68,7 +68,7 @@ else
 fi
 
 RET=0
-ip link show dev $bridge 1>/dev/null 2>&1 || RET=1
+ip link show dev "$bridge" 1>/dev/null 2>&1 || RET=1
 if [ "$RET" -eq 1 ]
 then
     fatal "Could not find bridge device $bridge"
@@ -77,7 +77,7 @@ fi
 case "$command" in
     online)
         setup_virtual_bridge_port "$dev"
-        set_mtu $bridge $dev
+        set_mtu "$bridge" "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
 
@@ -88,7 +88,7 @@ case "$command" in
 
     add)
         setup_virtual_bridge_port "$dev"
-        set_mtu $bridge $dev
+        set_mtu "$bridge" "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
 esac
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Olaf Hering

Cosmetics: most of the variables used in vif-bridge are already quoted. Add quoting also to the remaining shell variables.

(I imagine much hilarity would ensue all over the place if a Linux netdev actually had a name with a space in it...)

Quoted 32 lines
Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

---
 tools/hotplug/Linux/vif-bridge | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
tools/hotplug/Linux/vif- renamed from tools/hotplug/Linux/vif-bridge +0 -0

bridge
index 3d72ca4..6956dea 100644

tools/hotplug/Linux/vif-bridge +0 -0
@@ -68,7 +68,7 @@ else

 fi

 RET=0

tools/hotplug/Linux/vif-bridge +1 -1
-ip link show dev $bridge 1>/dev/null 2>&1 || RET=1
+ip link show dev "$bridge" 1>/dev/null 2>&1 || RET=1

 if [ "$RET" -eq 1 ]
 then
     fatal "Could not find bridge device $bridge"

tools/hotplug/Linux/vif-bridge +0 -0
@@ -77,7 +77,7 @@ fi

 case "$command" in
     online)
         setup_virtual_bridge_port "$dev"
-        set_mtu $bridge $dev
+        set_mtu "$bridge" "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;

tools/hotplug/Linux/vif-bridge +0 -0
@@ -88,7 +88,7 @@ case "$command" in
Quoted 8 lines


     add)
         setup_virtual_bridge_port "$dev"
-        set_mtu $bridge $dev
+        set_mtu "$bridge" "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
 esac

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel