From: Chris Lalancette <clalance@redhat.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH]: Fix up python breakage for blkdev_name_to_number
Date: Mon, 30 Jun 2008 08:42:35 +0200 [thread overview]
Message-ID: <4868805B.8020309@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 451 bytes --]
Stefan Berger pointed out that xm-test was having failures with the new
blkdev_name_to_number code. I found that I had forgotten to update the code in
xm-test for the new (xenbus_path, number) tuple that blkdev_name_to_number
returns. While grepping through the tree, I also found two other places where I
failed to fix up blkdev_name_to_number; all 3 of these fixes are in the attached
patch.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
[-- Attachment #2: xen-unstable-greater-16-vbd-tools-python-update.patch --]
[-- Type: text/x-patch, Size: 1690 bytes --]
diff -r 0972fc23b504 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 08:40:08 2008 +0200
@@ -63,7 +63,7 @@ def blkdev_segment(name):
type: 'Disk' or identifying name for partition type
"""
val = None
- n = blkdev_name_to_number(name)
+ (name, n) = blkdev_name_to_number(name)
if not n is None:
val = { 'device' : n,
'start_sector' : long(0),
diff -r 0972fc23b504 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Sat Jun 28 16:29:00 2008 +0100
+++ b/tools/python/xen/xend/XendConfig.py Mon Jun 30 08:40:08 2008 +0200
@@ -1123,7 +1123,7 @@ class XendConfig(dict):
try:
devid = int(dev2)
except ValueError:
- devid = blkdev_name_to_number(dev2)
+ (xenbus, devid) = blkdev_name_to_number(dev2)
if devid == None:
log.debug("The device %s is not device name", dev2)
return None
diff -r 0972fc23b504 tools/xm-test/lib/XmTestLib/block_utils.py
--- a/tools/xm-test/lib/XmTestLib/block_utils.py Sat Jun 28 16:29:00 2008 +0100
+++ b/tools/xm-test/lib/XmTestLib/block_utils.py Mon Jun 30 08:40:08 2008 +0200
@@ -15,7 +15,7 @@ __all__ = [ "block_attach", "block_detac
def get_state(domain, devname):
- number = xen.util.blkif.blkdev_name_to_number(devname)
+ (path, number) = xen.util.blkif.blkdev_name_to_number(devname)
s, o = traceCommand("xm block-list %s | awk '/^%d/ {print $4}'" %
(domain.getName(), number))
if s != 0:
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-06-30 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4868805B.8020309@redhat.com \
--to=clalance@redhat.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.