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: <0c3001c14475$b49ff9d0$0200a8c0@lifelesswks> From: "Robert Collins" To: "Ronald Landheer" , References: <0c2601c14475$5d9d3210$0200a8c0 AT lifelesswks> Subject: Re: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff) Date: Mon, 24 Sep 2001 07:21:26 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 23 Sep 2001 21:29:24.0419 (UTC) FILETIME=[D0DF0130:01C14476] > ----- Original Message ----- > From: "Ronald Landheer" > To: > Sent: Monday, September 24, 2001 7:04 AM > Subject: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff) > > > Hello all, > > 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 :]. > have patched up the patch I sent earlier to take care of a lacking > feature. > Much of my original mail is still valid, so I'm re-posting: > > -- BEGIN RE-POST -- > > On Wed, Sep 19, 2001 at 04:11:52PM -0300, salvador wrote: > >> 1) "ls -la /" doesn't show any cygdrive directory. Note it could > >> be solved in the same way UNIX solves the /proc stuff, just mounting > >> over an existent directory a fake one. > >> 2) "ls -la /cygdrive" doesn't work. > > Correct. > > If you'd like to correct this, patches will be, as always, > > gratefully accepted. > I saw this, it itched me, so I'm attaching a patch :) > > 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. I stopped reading here... but if you patch stat() I promise to read further. Rob -- 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/