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

[Xen-changelog] [xen-unstable] xend: canonicalise symlinks found in /dev

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: canonicalise symlinks found in /dev for vbds (helps vscsi)
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 09 Feb 2011 06:50:43 -0800
Delivery-date: Wed, 09 Feb 2011 06:53:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User James Harper <james.harper@xxxxxxxxxxxxxxxx>
# Date 1297182935 0
# Node ID aeda4adecaf85618918dc674855721e3fc9eb33d
# Parent  9e463cb156586bfd50b8123664f1c290ca9f1f98
xend: canonicalise symlinks found in /dev for vbds (helps vscsi)

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>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/python/xen/util/vscsi_util.py |    2 ++
 1 files changed, 2 insertions(+)

diff -r 9e463cb15658 -r aeda4adecaf8 tools/python/xen/util/vscsi_util.py
--- a/tools/python/xen/util/vscsi_util.py       Mon Feb 07 17:02:46 2011 +0000
+++ b/tools/python/xen/util/vscsi_util.py       Tue Feb 08 16:35:35 2011 +0000
@@ -159,6 +159,8 @@ def vscsi_get_scsidevices(mask=""):
 
 
 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)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: canonicalise symlinks found in /dev for vbds (helps vscsi), Xen patchbot-unstable <=