Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BAE774A.4000806@ece.gatech.edu> Date: Sun, 23 Sep 2001 19:59:06 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010713 X-Accept-Language: en-us MIME-Version: 1.0 To: Ronald Landheer CC: Robert Collins , cygwin AT cygwin DOT com Subject: Re: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff) References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ronald Landheer wrote: > Hello Rober /et al/ > > >>>After the overwhelming display of interest for my last mail on this >>>subject (which had gone completely unnoticed as far as I can tell), I >>> >>I missed it - cannot even recall it :]. >> > As did the rest of the world, I guess.. ;) > > >>>The patch I'm attaching is against the source 'ls.c' as found in >>>fileutils-4.1-1. It introduces three methods, of which one is called: >>>ls-cygwin-loop(). It is called whenever needed. >>>Note it only shows you that cygdrive exists. As there is no "magic >>>dir" filetype, and it's not a real directory, I'm not showing it as >>>one. My patch only does anything when there *is* no real directory - >>>if it comes through a stat() call, it is not handled. >>> >>You've hit it on the button. stat() is what you need to patch, not ls. >> > > (other mail) > >>Sorry, a little more detail is needed, it's stat() + opendir() + >>readdir() IIRC that need altering. >> > You do recall correctly :) > In fact, you're right: the only thing is I was patching ls, but come to > think of it, the cygdrive magic dir (and any other magic dir) should > just come through a stat() call correctly, and opendir() and readdir() > should handle it correctly. > > As it's better to grab a bug by the guts than just pull its antenna's > off, I'm back to the bug hunt (got the hat, the net and everything :) > > I just have a question about the stat() implementation: there seem to be > a lot of them (different ones for different systems, ofcourse). I should > probably take the one from go32? (looks very DJGPP-ish to me, but that > could just be me). > > Same question (and same assumed probable answer) for opendir() and > readdir()? > > The implementations I'm referring to here are in newlib/libc/sys/go32 > The reason I think it might be these is because they seem to be DOS > implementations, and the cygwin directory (meaning > newlib/libc/sys/cygwin) doesn't contain any implementations. > Building and examining the makefiles takes a rather long time, and as > you - or other people on the list - probably know where these functions > live by heart, it's a lot easier to just ask.. None of these are correct. You should be looking in /cygwin/winsup/cygwin/*.cc, not /newlib/*. You probably want to take a look at syscalls.cc or fhandler_*.cc or path.cc. --Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/