All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vscsi and symlinks
@ 2011-02-07  1:24 James Harper
  2011-02-07  8:51 ` Ian Campbell
  2011-02-07 16:22 ` [PATCH] vscsi and symlinks Ian Jackson
  0 siblings, 2 replies; 8+ messages in thread
From: James Harper @ 2011-02-07  1:24 UTC (permalink / raw)
  To: xen-devel

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/

James

--- 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)

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

end of thread, other threads:[~2011-02-08 16:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.