From: Leendert van Doorn Subject: [PATCH] Make xm reboot/shutdown work again (undo 8697) Date: Thu, 02 Mar 2006 14:44:01 -0500 Message-ID: <20060302194402.03F73145D@huxley.watson.ibm.com> Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: asit.k.mallick@intel.com, wilfred.yu@intel.com, keir@xensource.com, ke.yu@intel.com List-Id: xen-devel@lists.xenproject.org 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. Leendert Signed-Off-By: Leendert van Doorn diff -r b50d3fca138e tools/python/xen/xend/server/blkif.py --- a/tools/python/xen/xend/server/blkif.py Thu Mar 2 18:16:21 2006 +++ b/tools/python/xen/xend/server/blkif.py Thu Mar 2 20:22:13 2006 @@ -42,10 +42,6 @@ """@see DevController.getDeviceDetails""" dev = sxp.child_value(config, 'dev') - if 'ioemu:' in dev: - return (None,{},{}) - - devid = blkif.blkdev_name_to_number(dev) (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1) back = { 'dev' : dev, @@ -54,7 +50,13 @@ 'mode' : sxp.child_value(config, 'mode', 'r') } - front = { 'virtual-device' : "%i" % devid } + if 'ioemu:' in dev: + (dummy, dev1) = string.split(dev, ':', 1) + devid = blkif.blkdev_name_to_number(dev1) + front = {} + else: + devid = blkif.blkdev_name_to_number(dev) + front = { 'virtual-device' : "%i" % devid } return (devid, back, front)