[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 01 of 13 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 25752ced44427caec863c3e64185429c39b28c3a # Parent 9482810bc60588c7d340009d85a20891253be27d 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 9482810bc605 -r 25752ced4442 tools/hotplug/NetBSD/block --- a/tools/hotplug/NetBSD/block Sat Jan 14 19:04:48 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 |