mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
tools/hotplug/Linux: remove code duplication in vif-bridge
The 'add' and 'online' cases do exactly the same thing so have 'add' simply
fall through to 'online'.
NOTE: This patch also adds in the missing 'remove' case, which falls though
to 'offline'. (The former is passed for 'tap' devices, the latter for
'vif' devices).
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
This commit is contained in:
1 parent
bb13d936d2
commit
b51715f02b
1 file changed
+4
-7
@@ -77,21 +77,18 @@ then
|
||||
fi
|
||||
|
||||
case "$command" in
|
||||
add)
|
||||
;&
|
||||
online)
|
||||
setup_virtual_bridge_port "$dev"
|
||||
set_mtu "$bridge" "$dev"
|
||||
add_to_bridge "$bridge" "$dev"
|
||||
;;
|
||||
|
||||
remove)
|
||||
;&
|
||||
offline)
|
||||
remove_from_bridge "$bridge" "$dev"
|
||||
;;
|
||||
|
||||
add)
|
||||
setup_virtual_bridge_port "$dev"
|
||||
set_mtu "$bridge" "$dev"
|
||||
add_to_bridge "$bridge" "$dev"
|
||||
;;
|
||||
esac
|
||||
|
||||
handle_iptable
|
||||
|
||||