X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <46F1CC1B.C02FFEF6@dessent.net>
Date: Wed, 19 Sep 2007 18:25:47 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
CC: "Matt Seitz (matseitz)" <matseitz@cisco.com>
Subject: Re: Ls POSIX style slink output
References: <70952A932255A2489522275A628B97C3052E9663@xmb-sjc-233.amer.cisco.com> <46F1C712.7050309@byu.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Eric Blake wrote:

> Symlinks merely contain whatever text they were created with.  If the text
> it was created with was Windows style, then readlink(2) will not translate
> it.  I suppose I could try to patch ln(1) to posix-ify any name that looks
> like a Windows filename before actually calling symlink(2), but I'm not
> sure it buys much.  So for now, it's a feature, not a bug.

Yes, those symlinks in /etc are explicitly created with Win32 paths by
the base-files postinstall script.  I think the reasoning here is that
if a POSIX path were used for the target of the symlink then it would
have to be updated if the user ever changed the name of the /cygdrive
prefix, whereas just using a Win32 path is always correct and insulates
from that variable.

Moreover, I think recent versions of the Cygwin DLL (i.e. 1.7/HEAD) do
in fact normalize the target to be in POSIX form when reading the
contents of the symlink file.  I seem to recall a headsup from Corinna
about this a while ago.  This means no special accomodations are needed
in 'ls'.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

