[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Support destruction of device by /dev/sda1 (for example) even when the



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 1cf273e133c8bb89fb61f49f655ede4eb84ae824
# Parent  cbf7efa871ae30825552f250b4efe3dc8784949d
Support destruction of device by /dev/sda1 (for example) even when the
configuration just said sda1.
 
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r cbf7efa871ae -r 1cf273e133c8 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Thu Nov 24 15:52:42 2005
+++ b/tools/python/xen/xend/server/blkif.py     Thu Nov 24 15:55:49 2005
@@ -93,8 +93,10 @@
         try:
             DevController.destroyDevice(self, int(devid))
         except ValueError:
+            devid_end = devid.split('/')[-1]
             for i in self.deviceIDs():
-                if self.readBackend(i, 'dev') == devid:
+                d = self.readBackend(i, 'dev')
+                if d == devid or d == devid_end:
                     DevController.destroyDevice(self, i)
                     return
             raise VmError("Device %s not connected" % devid)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.