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-changelog

[Xen-changelog] [xen-unstable] [XEND] Compare result of blkdev_name_to_n

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Compare result of blkdev_name_to_number() explicitly against None.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:10:16 +0000
Delivery-date: Thu, 02 Nov 2006 21:44:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 70687bcb82dd0b2d5813e6125c95ff908e25c94d
# Parent  9a4274724794681f31ab1191700203c879bd9387
[XEND] Compare result of blkdev_name_to_number() explicitly against None.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/python/xen/util/blkif.py        |    2 +-
 tools/python/xen/xend/server/blkif.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 9a4274724794 -r 70687bcb82dd tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py    Wed Nov 01 19:44:34 2006 +0000
+++ b/tools/python/xen/util/blkif.py    Thu Nov 02 07:46:06 2006 +0000
@@ -52,7 +52,7 @@ def blkdev_segment(name):
     """
     val = None
     n = blkdev_name_to_number(name)
-    if n:
+    if not n is None:
         val = { 'device'       : n,
                 'start_sector' : long(0),
                 'nr_sectors'   : long(1L<<63),
diff -r 9a4274724794 -r 70687bcb82dd tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Wed Nov 01 19:44:34 2006 +0000
+++ b/tools/python/xen/xend/server/blkif.py     Thu Nov 02 07:46:06 2006 +0000
@@ -80,7 +80,7 @@ class BlkifController(DevController):
                          'acm_policy' : policy})
 
         devid = blkif.blkdev_name_to_number(dev)
-        if not devid:
+        if devid is None:
             raise VmError('Unable to find number for device (%s)' % (dev))
 
         front = { 'virtual-device' : "%i" % devid,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Compare result of blkdev_name_to_number() explicitly against None., Xen patchbot-unstable <=