|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 02 of 29 RFC] hotplug/block: get the type of block device from file path (NetBSD)
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317386335 -7200
# Node ID 9a8ccac7b5986622f76fb8c501d2ef500f2d77a1
# Parent e38c059da393c3fa2ee222d2e90275ca88b85d4f
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@xxxxxxxxxxxxx>
diff -r e38c059da393 -r 9a8ccac7b598 tools/hotplug/NetBSD/block
--- a/tools/hotplug/NetBSD/block Sat Jan 14 14:40:56 2012 +0100
+++ 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |