This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff)
- To: Ronald Landheer <info at rlsystems dot net>
- Subject: Re: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff)
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Sun, 23 Sep 2001 19:59:06 -0400
- CC: Robert Collins <robert dot collins at itdomain dot com dot au>,cygwin at cygwin dot com
- References: <NFBBLOMHALONCDMPGBLFGECPCCAA.info@rlsystems.net>
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/