WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] tools/python: fix TypeError for 17903:0728459b3c8d

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools/python: fix TypeError for 17903:0728459b3c8d
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Mon, 30 Jun 2008 16:28:55 +0900 (JST)
Delivery-date: Mon, 30 Jun 2008 00:30:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

If `hda' is used in a domain config file and domain-0 has /dev/hda,
creating the domain failed by TypeError:

  File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
    (device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1214810013 -32400
# Node ID 0063343e6fcb2d9501e2410cd7dff8981a301f26
# Parent  0972fc23b5041c8a29416b2875ae7d45faa66109
tools/python: fix TypeError for 17903:0728459b3c8d

If `hda' is used in domU config file and domain-0 has /dev/hda,
creating a domain failed by TypeError:

  File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
    (device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 0972fc23b504 -r 0063343e6fcb tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py    Sat Jun 28 16:29:00 2008 +0100
+++ b/tools/python/xen/util/blkif.py    Mon Jun 30 16:13:33 2008 +0900
@@ -20,7 +20,7 @@ def blkdev_name_to_number(name):
     devnum = None
 
     try:
-        return os.stat(n).st_rdev
+        return (devname, os.stat(n).st_rdev)
     except Exception, ex:
         pass
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>