Mailing List Archive

[PATCH 07 of 11 v3] hotplug NetBSD: pass an action instead of a state to hotplug scripts
# HG changeset patch
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# Date 1322751691 -3600
# Node ID 8ff55cfa427f123982884436f8b80614fb0ce50f
# Parent 5e9c1fc4869fa14c2b54b33866a3784db94da852
hotplug NetBSD: pass an action instead of a state to hotplug scripts

change second parameter of NetBSD hotplug scripts to take an action
(CONNECT/DISCONNECT) instead of a xenbus state.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>

diff -r 5e9c1fc4869f -r 8ff55cfa427f tools/hotplug/NetBSD/block
--- a/tools/hotplug/NetBSD/block Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/hotplug/NetBSD/block Thu Dec 01 16:01:31 2011 +0100
@@ -18,12 +18,12 @@ error() {


xpath=$1
-xstatus=$2
+xaction=$2
xtype=$3
xparams=$(xenstore-read "$xpath/params")

-case $xstatus in
-6)
+case $xaction in
+2)
# device removed
case $xtype in
file)
@@ -41,7 +41,7 @@ 6)
xenstore-rm $xpath
exit 0
;;
-2)
+1)
case $xtype in
file)
# Store the list of available vnd(4) devices in
diff -r 5e9c1fc4869f -r 8ff55cfa427f tools/hotplug/NetBSD/vif-bridge
--- a/tools/hotplug/NetBSD/vif-bridge Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/hotplug/NetBSD/vif-bridge Thu Dec 01 16:01:31 2011 +0100
@@ -11,15 +11,15 @@ PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${P
export PATH

xpath=$1
-xstatus=$2
+xaction=$2

-case $xstatus in
-6)
+case $xaction in
+2)
# device removed
xenstore-rm $xpath
exit 0
;;
-2)
+1)
xbridge=$(xenstore-read "$xpath/bridge")
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
diff -r 5e9c1fc4869f -r 8ff55cfa427f tools/hotplug/NetBSD/vif-ip
--- a/tools/hotplug/NetBSD/vif-ip Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/hotplug/NetBSD/vif-ip Thu Dec 01 16:01:31 2011 +0100
@@ -11,15 +11,15 @@ PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${P
export PATH

xpath=$1
-xstatus=$2
+xaction=$2

-case $xstatus in
-6)
+case $xaction in
+2)
# device removed
xenstore-rm $xpath
exit 0
;;
-2)
+1)
xip=$(xenstore-read "$xpath/ip")
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel