|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 7/9] hotplug/NetBSD: check type of file to attach from params
xend used to set the xenbus backend entry "type" to either "phy" or
"file", but now libxl sets it to "phy" for both file and block device.
We have to manually check for the type of the "param" filed in order
to detect if we are trying to attach a file or a block device.
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Christoph Egger <Christoph.Egger@xxxxxxx>
Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
---
tools/hotplug/NetBSD/block | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/tools/hotplug/NetBSD/block b/tools/hotplug/NetBSD/block
index cf5ff3a..95acaa0 100644
--- a/tools/hotplug/NetBSD/block
+++ b/tools/hotplug/NetBSD/block
@@ -19,8 +19,12 @@ error() {
xpath=$1
xstatus=$2
-xtype=$(xenstore-read "$xpath/type")
xparams=$(xenstore-read "$xpath/params")
+if [ -b $xparams ]; then
+ xtype="phy"
+else
+ xtype="file"
+fi
case $xstatus in
6)
--
1.7.7.5 (Apple Git-26)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |