WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [BLKTAP] Fix in xend to properly destroy

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap'
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 06 Sep 2006 12:00:50 +0000
Delivery-date: Wed, 06 Sep 2006 05:01:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User jchesterfield@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 780409e8f0bae3bd2d1deae3f8f8fde2fd234755
# Parent  383bc7c7b19e9a716f6c50bfd978368d8923cf6b
[BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap'
Submitted by Andres Lagar Cavilla
---
 tools/python/xen/xend/XendDomainInfo.py |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -r 383bc7c7b19e -r 780409e8f0ba tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Sep 05 18:36:23 2006 -0700
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 06 11:42:29 2006 +0100
@@ -1087,6 +1087,15 @@ class XendDomainInfo:
     ## public:
 
     def destroyDevice(self, deviceClass, devid):
+       if type(devid) is str:
+           devicePath = '%s/device/%s' % (self.dompath, deviceClass)
+           for entry in xstransact.List(devicePath):
+               backend = xstransact.Read('%s/%s' % (devicePath, entry), 
"backend")
+               devName = xstransact.Read(backend, "dev")
+               if devName == devid:
+                   # We found the integer matching our devid, use it instead
+                   devid = entry
+                   break
         return self.getDeviceController(deviceClass).destroyDevice(devid)
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap', Xen patchbot-unstable <=