This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /cygdrive improvements

[Get raw message]
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]