X-Spam-Check-By: sourceware.org
Message-ID: <44D7AD48.5050503@andrew.cmu.edu>
Date: Mon, 07 Aug 2006 17:14:48 -0400
From: Adam Wolbach <awolbach@andrew.cmu.edu>
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cygwin, Coda and symbolic links
References: <44D27B36.1090400@andrew.cmu.edu> <20060804090559.GD8152@calimero.vinschen.de> <44D3963B.6090107@andrew.cmu.edu> <20060806001203.GF3109@trixie.casa.cgf.cx>
In-Reply-To: <20060806001203.GF3109@trixie.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-8-I; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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


> Is there some reason why you aren't just using cygwin's symlink()
> function?  Reverse engineering and mimicking cygwin's symlinks seems to
> be a pretty fragile way of writing an application which will play nicely
> with cygwin.  What if we change the way symlinks are written at some
> point?

Yeah, I agree we are taking this risk. We have a client process running 
on cygwin, but Coda's interaction with the Windows NT kernel sort of 
sits below cygwin, through the use of a kernel module also loaded as an 
NT service (we simply write to and read data from the device /dev/cfs, 
and cygwin is none the wiser). Thus the kernel module doesn't create 
files using cygwin's file system interface, it only provides another 
file system within its namespace.

We theoretically could use symlink() in the userspace client, but we'd 
have to introduce a lot of cased #ifdef _CYGWIN32_ code to create the 
file and change the kernel/userspace interface to handle the 
cygwin-specific nuances, like .lnk pathname conversions. We'd like to 
keep the solution as close to the problem as possible, which would be in 
the kernel module. Given this, since Win32 apps don't really go through 
cygwin to access our file system (it appears as a network drive), we 
need to be able create that local .lnk file that will be interpreted 
correctly by Windows and cygwin.


Adam

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

