delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/03/08:57:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33
X-Spam-Check-By: sourceware.org
Message-ID: <617861.50861.qm@web24204.mail.ird.yahoo.com>
Date: Thu, 3 Sep 2009 12:57:33 +0000 (GMT)
From: alf salte <alfsalte AT yahoo DOT no>
Subject: problems with symbolic links
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

My setup:

I have a network drive seen in windows as S: and has file type NTFS. Actual=
ly, the file system is ext3 but it seems the software on the network drive =
makes it appear as NTFS to windows - properties in windows describe it as N=
TFS.

In cygwin this is seen as /cygdrive/s and when I try to create a symbolic l=
ink on the drive it appears to be working correctly:

ln -s foo bar

creates a symbolic link bar.lnk that contains a reference to the file foo.

The problem is when I try to use this symbolic link. For one thing, scripts=
 that then try to open bar get a surprise since the filename is really bar.=
lnk but worse is the fact that neither bar nor bar.lnk opens up foo. less b=
ar just report file not found and less bar.lnk simply opens the link and du=
mps out the binary data in it where one of the fields contain the file foo.

What am I doing wrong? I did see that there was some problem if you did not=
 have the drive mounted as "system" but the drive /cygdrive/s is mounted as=
 (remote,system) so I am at a loss as to what is wrong.

Would appreciate any help in the matter. As it is, any installation script =
or make script that make a link "ln -s foo.c bar.c" will not be able to use=
 'bar.c' to refer to the file and gcc does not understand that bar.c.lnk is=
 supposed to be a C source file - nor is it a C source file since it is a l=
ink etc etc. Also, ls -l does not report the file as 'l' in the first chara=
cter, it reports the link as a regular file. Is there a bug in fstat()?

I would guess that open("foo",..) should check if the file "foo" is not fou=
nd, if there is a file "foo.lnk" and then open that file and find the file =
it references etc.  Not sure exactly how or where this is handled in the co=
de. Checking cygwin.dll source code there is a path name resolver class and=
 it does appear to add a ".lnk" extension but it appears to only apply to d=
irectory names in a path and not sure exactly under which conditions that c=
ode is enabled from a regular open() function.

Alf



      _________________________________________________________
Alt i ett. F=E5 Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019