ia64/xen-unstable

changeset 9120:4e7c8eae6775

This patch undoes 8697 and makes xm reboot/shutdown work again. This code
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.

My sincere appology to Ke Yu for the long wait and assuming his code
was broken. His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Mar 03 10:56:54 2006 +0100 (2006-03-03)
parents 7eafbed44734
children e0d8c23acaa7
files tools/python/xen/xend/server/blkif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/blkif.py	Fri Mar 03 10:56:13 2006 +0100
     1.2 +++ b/tools/python/xen/xend/server/blkif.py	Fri Mar 03 10:56:54 2006 +0100
     1.3 @@ -42,10 +42,6 @@ class BlkifController(DevController):
     1.4          """@see DevController.getDeviceDetails"""
     1.5  
     1.6          dev = sxp.child_value(config, 'dev')
     1.7 -        if 'ioemu:' in dev:
     1.8 -            return (None,{},{})
     1.9 -
    1.10 -        devid = blkif.blkdev_name_to_number(dev)
    1.11  
    1.12          (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1)
    1.13          back = { 'dev'    : dev,
    1.14 @@ -54,7 +50,13 @@ class BlkifController(DevController):
    1.15                   'mode'   : sxp.child_value(config, 'mode', 'r')
    1.16                   }
    1.17  
    1.18 -        front = { 'virtual-device' : "%i" % devid }
    1.19 +        if 'ioemu:' in dev:
    1.20 +            (dummy, dev1) = string.split(dev, ':', 1)
    1.21 +            devid = blkif.blkdev_name_to_number(dev1)
    1.22 +            front = {}
    1.23 +        else:
    1.24 +            devid = blkif.blkdev_name_to_number(dev)
    1.25 +            front = { 'virtual-device' : "%i" % devid }
    1.26  
    1.27          return (devid, back, front)
    1.28