All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix the return value of blkdev_name_to_number
@ 2008-06-30  9:13 Xu, Dongxiao
  2008-06-30 12:49 ` YuLin @ wr
  0 siblings, 1 reply; 3+ messages in thread
From: Xu, Dongxiao @ 2008-06-30  9:13 UTC (permalink / raw)
  To: Keir Fraser, xen-devel

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Fix the return value of blkdev_name_to_number().
  - Function blkdev_name_to_number() should return both devname and
devnum, 
otherwise it may cause "unpack non-sequence" error.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>

Best Regards,
-- Dongxiao


[-- Attachment #2: blkif_name_to_number.patch --]
[-- Type: application/octet-stream, Size: 625 bytes --]

Fix the return value of blkdev_name_to_number().
  - Function blkdev_name_to_number() should return both devname and devnum, 
otherwise it may cause "unpack non-sequence" error.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>

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 17:06:51 2008 +0800
@@ -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
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the return value of blkdev_name_to_number
  2008-06-30  9:13 [PATCH] Fix the return value of blkdev_name_to_number Xu, Dongxiao
@ 2008-06-30 12:49 ` YuLin @ wr
  2008-06-30 13:10   ` Chris Lalancette
  0 siblings, 1 reply; 3+ messages in thread
From: YuLin @ wr @ 2008-06-30 12:49 UTC (permalink / raw)
  To: Xu, Dongxiao; +Cc: xen-devel, Keir Fraser


[-- Attachment #1.1: Type: text/plain, Size: 808 bytes --]

hi,

Maybe you should list the position where there is a problem of "unpack
non-sequence" about blkdev_name_to_number
I only found some usages of blkdev_name_to_number which only accept one
return value, and the left value is not a tuple apparently.

Best Regards,
-- YuLin

On Mon, Jun 30, 2008 at 5:13 PM, Xu, Dongxiao <dongxiao.xu@intel.com> wrote:

> Fix the return value of blkdev_name_to_number().
>  - Function blkdev_name_to_number() should return both devname and
> devnum,
> otherwise it may cause "unpack non-sequence" error.
>
> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
>
> Best Regards,
> -- Dongxiao
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>


-- 
Best Regards,
-- Lin.Yu

[-- Attachment #1.2: Type: text/html, Size: 1346 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the return value of blkdev_name_to_number
  2008-06-30 12:49 ` YuLin @ wr
@ 2008-06-30 13:10   ` Chris Lalancette
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Lalancette @ 2008-06-30 13:10 UTC (permalink / raw)
  To: YuLin @ wr; +Cc: Xu, Dongxiao, xen-devel, Keir Fraser

YuLin @ wr wrote:
> hi,
> 
> Maybe you should list the position where there is a problem of "unpack
> non-sequence" about blkdev_name_to_number
> I only found some usages of blkdev_name_to_number which only accept one
> return value, and the left value is not a tuple apparently.

Yes, sorry about that.  I posted a patch earlier today which should fix the rest
of the blkdev_name_to_number fixes, and between that and the other os.stat()
fix, hopefully that should fix it up.

Chris Lalancette

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-30 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-30  9:13 [PATCH] Fix the return value of blkdev_name_to_number Xu, Dongxiao
2008-06-30 12:49 ` YuLin @ wr
2008-06-30 13:10   ` Chris Lalancette

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.