]> xenbits.xensource.com Git - xen.git/commitdiff
tools/xend: Revert 21541:7ff0e885b5c3 "a few blktap2 fixes"
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Jun 2010 15:21:20 +0000 (16:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Jun 2010 15:21:20 +0000 (16:21 +0100)
Following discussion on xen-devel.  This changeset is doubtful and in
any case incomplete.

tools/python/xen/util/blkif.py
tools/python/xen/xend/XendBootloader.py
tools/python/xen/xend/XendDomainInfo.py

index ca5a3081b51437507079937b69c0b4cd3d42f198..cbe76b613f78d13110748c7e335f86f40e2acd64 100644 (file)
@@ -87,7 +87,7 @@ def _parse_uname(uname):
                 fn = "/dev/%s" %(fn,)
                
         if typ in ("tap", "tap2"):
-            (taptype, fn) = fn.split(":", 2)[1:3]
+            (taptype, fn) = fn.split(":", 1)
     return (fn, taptype)
 
 def blkdev_uname_to_file(uname):
index 3824d5ac17a73729a2c0bd2a4b488e24bc3fc8ea..0cef917358e21a47169c3b634b0b89ebf499529d 100644 (file)
@@ -38,15 +38,10 @@ def bootloader(blexec, disk, dom, quiet = False, blargs = '', kernel = '',
         msg = "Bootloader isn't executable"
         log.error(msg)
         raise VmError(msg)
-    attempt = 0
-    while True:
-        if not os.access(disk, os.R_OK) and attempt > 3:
-            msg = "Disk isn't accessible"
-            log.error(msg)
-            raise VmError(msg)
-        else:
-            break
-        attempt = attempt + 1
+    if not os.access(disk, os.R_OK):
+        msg = "Disk isn't accessible"
+        log.error(msg)
+        raise VmError(msg)
 
     if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'):
        disk = disk.replace("/dev/", "/dev/r")
index 5a8d71a7182c4853a1948b3f250d1cd376124456..831506b9d953273f019e5106b930b4f749f5232a 100644 (file)
@@ -3287,7 +3287,7 @@ class XendDomainInfo:
                     log.info("Unmounting %s from %s." %
                              (fn, BOOTLOADER_LOOPBACK_DEVICE))
 
-                    dom0.destroyDevice(devtype, BOOTLOADER_LOOPBACK_DEVICE, force = True)
+                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
 
             if blcfg is None:
                 msg = "Had a bootloader specified, but can't find disk"