[BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap'

Submitted by Andres Lagar Cavilla
This commit is contained in:
jchesterfield@dhcp92.uk.xensource.com committed 2006-09-06 11:42:29 +01:00
1 parent 7c0fc730a3
commit c2a28ee6ac
1 file changed
+9
+9
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.