Mailing List Archive

[PATCH 01 of 15 v5] hotplug/block: get the type of block device from file path (NetBSD)
# HG changeset patch
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# Date 1317386335 -7200
# Node ID 8e129474fc0ac87623ba814ea865326d45cb8436
# Parent 7ca56cca09ade16645fb4806be2c5b2b0bc3332b
hotplug/block: get the type of block device from file path (NetBSD)

Guess the type of block device to attach based on the file name
present in xenstore, since new Xen versions don't make a difference
between a block device or an image.

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

diff -r 7ca56cca09ad -r 8e129474fc0a tools/hotplug/NetBSD/block
--- a/tools/hotplug/NetBSD/block Mon Dec 12 17:59:43 2011 +0000
+++ b/tools/hotplug/NetBSD/block Fri Sep 30 14:38:55 2011 +0200
@@ -19,9 +19,14 @@ error() {

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

+if [ -f $xparams ]; then
+ xtype="file"
+else
+ xtype="phy"
+fi
+
case $xstatus in
6)
# device removed

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