All of lore.kernel.org
 help / color / mirror / Atom feed
From: "James Harper" <james.harper@bendigoit.com.au>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: RE: [PATCH] vscsi and symlinks
Date: Tue, 8 Feb 2011 11:28:46 +1100	[thread overview]
Message-ID: <AEC6C66638C05B468B556EA548C1A77D01C552AB@trantor> (raw)
In-Reply-To: <19792.7265.145022.230473@mariner.uk.xensource.com>

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@bendigoit.com.au>

--- 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@eu.citrix.com]
> Sent: Tuesday, 8 February 2011 03:23
> To: James Harper
> Cc: xen-devel@lists.xensource.com
> 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.

      reply	other threads:[~2011-02-08  0:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07  1:24 [PATCH] vscsi and symlinks James Harper
2011-02-07  8:51 ` Ian Campbell
     [not found]   ` <864CFF73-782A-443F-86E4-4D8CFB2607C1@bendigoit.com.au>
2011-02-07 10:17     ` Ian Campbell
2011-02-07 11:28       ` James Harper
2011-02-07 11:30         ` Ian Campbell
2011-02-08 16:36           ` [PATCH] vscsi and symlinks [and 1 more messages] Ian Jackson
2011-02-07 16:22 ` [PATCH] vscsi and symlinks Ian Jackson
2011-02-08  0:28   ` James Harper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AEC6C66638C05B468B556EA548C1A77D01C552AB@trantor \
    --to=james.harper@bendigoit.com.au \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.