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

RE: [Xen-devel] [PATCH] vscsi and symlinks

To: "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] vscsi and symlinks
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Tue, 8 Feb 2011 11:28:46 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 07 Feb 2011 16:29:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19792.7265.145022.230473@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: <AEC6C66638C05B468B556EA548C1A77D01C55267@trantor> <19792.7265.145022.230473@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvG41fH2GaySZJhSl2XlWon/C2ZwAAQ4oyg
Thread-topic: [Xen-devel] [PATCH] vscsi and symlinks
With signed-off-by line :)

By default, vscsi expects to be passed the final device name (eg
/dev/st3) instead of one of the various udev symlinks (eg
/dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch
resolves the path to the real path if the name starts with /dev/

Signed-off-by: James Harper <james.harper@xxxxxxxxxxxxxxxx>

--- a/tools/python/xen/util/vscsi_util.py  2010-12-03 23:26:46.391655087
+1100
+++ b/tools/python/xen/util/vscsi_util.py  2011-02-07 12:20:37.599527204
+1100
@@ -158,6 +158,8 @@


 def vscsi_get_hctl_and_devname_by(target, scsi_devices = None):
+    if target.startswith('/dev/'):
+        target = os.path.realpath(target)
     if scsi_devices is None:
         if len(target.split(':')) == 4:
             scsi_devices = _vscsi_get_scsidevices_by_lsscsi(target)



> -----Original Message-----
> From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx]
> Sent: Tuesday, 8 February 2011 03:23
> To: James Harper
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH] vscsi and symlinks
> 
> James Harper writes ("[Xen-devel] [PATCH] vscsi and symlinks"):
> > By default, vscsi expects to be passed the final device name (eg
> > /dev/st3) instead of one of the various udev symlinks (eg
> > /dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following
patch
> > resolves the path to the real path if the name starts with /dev/
> 
> Thanks.  I would have applied this patch but you didn't provide a
> "signed-off-by", to confirm that your contribution is in accordance
> with the Developer's Certificate of Origin.
> 
> From Documentation/SubmittingPatches in the Linux kernel tree:
> 
>         Developer's Certificate of Origin 1.1
> 
>         By making a contribution to this project, I certify that:
> 
>         (a) The contribution was created in whole or in part by me and
I
>             have the right to submit it under the open source license
>             indicated in the file; or
> 
>         (b) The contribution is based upon previous work that, to the
best
>             of my knowledge, is covered under an appropriate open
source
>             license and I have the right under that license to submit
that
>             work with modifications, whether created in whole or in
part
>             by me, under the same open source license (unless I am
>             permitted to submit under a different license), as
indicated
>             in the file; or
> 
>         (c) The contribution was provided directly to me by some other
>             person who certified (a), (b) or (c) and I have not
modified
>             it.
> 
>         (d) I understand and agree that this project and the
contribution
>             are public and that a record of the contribution
(including all
>             personal information I submit with it, including my
sign-off) is
>             maintained indefinitely and may be redistributed
consistent with
>             this project or the open source license(s) involved.
> 
> Ian.

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

<Prev in Thread] Current Thread [Next in Thread>