[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |