WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnected a

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 6] hotplug: set hotplug-status to disconnected at removal
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Thu, 22 Sep 2011 14:01:09 +0200
Delivery-date: Thu, 22 Sep 2011 05:05:36 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to; bh=Y9agv2DDvWnfTknlp1kFer4N759bYwV1TA6mQHIZfbk=; b=hPamvIkYR01zUm6f+Z28xU9AT9B5El73bhVWB2aeP3yNY/44zymeBJ5zizHWjIhkoO U6zGT8D69T6h9jODMSf5oINwwBg1EXlso2+3aSPpjTvy8U0Io4plMjekBnqv9MDSYXW9 VCswHBkpwkrwxIfkrXNNsoD/VaLht83AMjTFw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1316692867@loki>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1316692867@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.4
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1316692482 -7200
# Node ID 1d3830f8a7306088b49d5732b5e88a73c2bc0315
# Parent  576c0ce336acb501cbba245dc801f06edc391479
hotplug: set hotplug-status to disconnected at removal

Set the hotplug-status attribute of xenstore to disconnected when the hotplug 
block script has finished disconnecting the device

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 576c0ce336ac -r 1d3830f8a730 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Thu Sep 22 13:54:35 2011 +0200
+++ b/tools/hotplug/Linux/block Thu Sep 22 13:54:42 2011 +0200
@@ -321,6 +321,7 @@ mount it read-write in a guest domain."
   remove)
     case $t in 
       phy)
+               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
        exit 0
        ;;
 
@@ -329,6 +330,7 @@ mount it read-write in a guest domain."
         node=$(xenstore_read "$XENBUS_PATH/node")
        losetup -d "$node"
         release_lock "block"
+               xenstore_write "$XENBUS_PATH/hotplug-status" "disconnected"
        exit 0
        ;;
 
diff -r 576c0ce336ac -r 1d3830f8a730 tools/hotplug/NetBSD/block
--- a/tools/hotplug/NetBSD/block        Thu Sep 22 13:54:35 2011 +0200
+++ b/tools/hotplug/NetBSD/block        Thu Sep 22 13:54:42 2011 +0200
@@ -38,6 +38,7 @@ 6)
                echo "unknown type $xtype" >&2
                ;;
        esac
+       xenstore-write $xpath/hotplug-status disconnected
        xenstore-rm $xpath
        exit 0
        ;;

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