|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] The disk isn't guaranteed to be the first device in	the 
 
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID af6a564ea81c9cfde03d728d691bbe27086bdd7a
# Parent  c7550ed2ccbf0c2498591c2a878cb6068f573982
The disk isn't guaranteed to be the first device in the config sxp --
make sure we can restart domains when using a boot loader even if not.
Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx>
diff -r c7550ed2ccbf -r af6a564ea81c tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Sun Feb 26 09:54:06 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py   Sun Feb 26 09:55:21 2006
@@ -1502,15 +1502,14 @@
         if not self.info['bootloader']:
             return
         # if we're restarting with a bootloader, we need to run it
-        # FIXME: this assumes the disk is the first device and
-        # that we're booting from the first disk
         blcfg = None
         config = self.sxpr()
         # FIXME: this assumes that we want to use the first disk
-        dev = sxp.child_value(config, "device")
-        if dev:
-            disk = sxp.child_value(dev, "uname")
-            fn = blkdev_uname_to_file(disk)
+        for dev in sxp.children(config, "device"):
+            disk = sxp.child(dev, "vbd")
+            if disk is None:
+                continue
+            fn = blkdev_uname_to_file(sxp.child_value(disk, "uname"))
             blcfg = bootloader(self.info['bootloader'], fn, 1,
                                self.info['vcpus'])
         if blcfg is None:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-changelog] The disk isn't guaranteed to be the first device in	the config sxp --,
Xen patchbot -unstable <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |