Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 21:14:27 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: /cygdrive improvements Message-ID: <20011124211427.Z14975@cygbert.vinschen.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011122060643.GA12017@redhat.com>; from cgf@redhat.com on Thu, Nov 22, 2001 at 01:06:43AM -0500 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. 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. Index: path.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/path.cc,v retrieving revision 1.186 diff -u -p -r1.186 path.cc --- path.cc 2001/11/24 03:35:58 1.186 +++ path.cc 2001/11/24 20:11:44 @@ -493,9 +493,8 @@ path_conv::check (const char *src, unsig return; } fileattr = 0; + goto out; /* Found a device. Stop parsing. */ } - - goto out; /* Found a device. Stop parsing. */ } update_fs_info (full_path); -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.