delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/11/24/15:53:21

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Sat, 24 Nov 2001 15:53:36 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: /cygdrive improvements
Message-ID: <20011124205336.GA8408@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <20011122060643 DOT GA12017 AT redhat DOT com> <20011124211427 DOT Z14975 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20011124211427.Z14975@cygbert.vinschen.de>
User-Agent: Mutt/1.3.23.1i

On Sat, Nov 24, 2001 at 09:14:27PM +0100, Corinna Vinschen wrote:
>On Thu, Nov 22, 2001 at 01:06:43AM -0500, Christopher Faylor wrote:
>> I've just made some changes to cygwin.
>> 
>> I've added opendir, readdir, telldir, etc.  methods to the fhandler
>> class.
>> 
>> I also implemented /cygdrive as a special "device" in cygwin.  Cygdrive
>> inherits most of its methods from fhandler_disk_file except for the opendir
>> ones.
>> 
>> I've implemented the directory handling methods for cygdrive so that you
>> can now do this:
>> 
>>     % ls /cygdrive
>>     a   c  d  e
>> 
>> This allows completion in shells like zsh.
>> 
>> The only thing wrong with this currently is that zsh times out trying to
>> read the floppy drive the first time.
>
>It does on empty CD-ROMs and any kind of removable media drives, too.
>That is, three times the "no media" message on my XP box.  I like this
>/cygdrive patch but I think we should avoid these messages.  I'm breaking
>out in a sweat thinking of the funny postings in the cygwin mailing list.
>I have no solution currently (I haven't even tried to find one, FWIW)
>but I will look for one.
>
>Anyway, there's actually a tiny bug in path.cc, path_conv::check().
>I found that I couldn't use the applications in my Windows system
>folder anymore.  These are accessed through /cygdrive/e/WINXP/... path:
>
>~ $ ping cygwin.com
>ping: Command not found.
y
>But then, the surprise:
>
>~ $ ping.exe cygwin.com
>
>Pinging cygwin.com [209.249.29.67] with 32 bytes of data:
>
>Reply from 209.249.29.67: bytes=32 time=315ms TTL=245
>[...]
>
>I had a look into path.cc and found that the whole symlink code is
>short circuted if the device number returned by conv_to_win32_path()
>is FH_CYGDRIVE.
>
>The following patch seems to solve that problem but... is it correct?
>
>Corinna
>
>	* path.cc (path_conv::check): Don't return immediately if path
>	is a cygdrive path.

That would do it but I think I'll fix the problem earlier in the
process.  I was wondering if defaulting /cygdrive/c to a FH_CYGDRIVE
would cause breakage and it obviously does.  I thought it might be
useful to have a special driver for the /cygdrive/x handling at some
point so I made both /cygdrive and /cygdrive/c return FH_CYGDRIVE.

However, since I can't currently think of any good reason to have a
special handler for the /cygdrive/x case, I've made it so that only a
'/cygdrive' or '/cygdrive/.' return FH_CYGDRIVE.

cgf

- Raw text -


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