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

xen-devel

[Top] [All Lists]

Re: [Xen-devel] Re: [PATCH] pvscsi xend python syntax problem

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Jun Kamada <kama@xxxxxxxxxxxxxx>, Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] pvscsi xend python syntax problem
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: 2008年10月21日 08:58:01 +0900
Cc:
Delivery-date: 2008年10月20日 16:58:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18684.35770.189941.747513@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <18684.35118.284372.851545@xxxxxxxxxxxxxxxxxxxxxxxx> <18684.35770.189941.747513@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ian,
Thanks for your report.
I will fix them. 
Best regards,
 Kan
2008年10月20日 14:46:34 +0100, Ian Jackson wrote:
>Also, I've just noticed this:
>
> if re.match('^scsi_generic', f):
> os.chdir(os.path.join(paths, f))
> sg = os.path.basename(os.getcwd())
>
>which is really crazy! A utility function like this must not just use
>chdir! Is this really the best way of doing this ?
>
>In the meantime this might be a better patch. (NB: not tested.)
>
>Ian.
>
>diff -r 4129f0f2f2ba tools/python/xen/util/vscsi_util.py
>--- a/tools/python/xen/util/vscsi_util.py Fri Oct 17 14:15:37 2008 +0100
>+++ b/tools/python/xen/util/vscsi_util.py Mon Oct 20 14:46:11 2008 +0100
>@@ -114,7 +114,7 @@ def vscsi_get_scsidevices():
> os.chdir(os.path.join(paths, f))
> block = os.path.basename(os.getcwd())
>
>- if re.match('^scsi_generic', f):
>+ if false and re.match('^scsi_generic', f):
> os.chdir(os.path.join(paths, f))
> sg = os.path.basename(os.getcwd())
> lines = os.popen('/sbin/scsi_id -gu -s /class/
>scsi_generic/' + sg).read().split()
>@@ -122,6 +122,8 @@ def vscsi_get_scsidevices():
> scsi_id = '-'
> else:
> scsi_id = lines[0]
>+ else:
>+ sg = None
>
> devices.append([hctl, block, sg, scsi_id])
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] XSM/Flask and SELinux policy Compiler problem , George S. Coker, II
Next by Date: [Xen-devel] [Xen-ia64-devel][PATCH] IA64: update ia64 px info transfer corresponding to x86 px info update. , Liu, Jinsong
Previous by Thread: [Xen-devel] Re: [PATCH] pvscsi xend python syntax problem , Ian Jackson
Next by Thread: [Xen-devel] XSM/Flask and SELinux policy Compiler problem , Ahmed, Farid
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /