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 Campbell" <Ian.Campbell@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] vscsi and symlinks
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Mon, 7 Feb 2011 22:28:30 +1100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Feb 2011 03:29:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297073862.13091.809.camel@xxxxxxxxxxxxxxxxxxxxxx>
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> <1297068677.13091.712.camel@xxxxxxxxxxxxxxxxxxxxxx> <864CFF73-782A-443F-86E4-4D8CFB2607C1@xxxxxxxxxxxxxxxx> <1297073862.13091.809.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvGsEzOZtza5GPxSOG7GugKPEX4pgACR5cQ
Thread-topic: [Xen-devel] [PATCH] vscsi and symlinks
> 
> On Mon, 2011-02-07 at 09:43 +0000, James Harper wrote:
> > I think target isn't always a file. It can be a scsi ID like 0:1:2:3.
> > I think it can be other types of specifier too.
> 
> OK. So perhaps:
> 
> if os.path.islink(target):
>       target = os.path.realpath(target)
> 

I guess. I know it's a long shot but what if there was a symlink called 
0:1:2:3? While that is unlikely, there might be other incantations used by 
vscsi that could ambiguously be the filename of a symlink or not. I'd be 
happier if realpath was only used if an absolute path was specified. Who's 
going to want to specify a relative path anyway... what would it be relative to?

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