This is the mail archive of the cygwin@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]

RE: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff)


Hello Corinna /et al/,

Corinna wrote:
> On Mon, Sep 24, 2001 at 09:24:23PM +0200, Ronald Landheer wrote:
>> directories exist before listing the magic ones. The only problem I 
>> forsee is that they might start conflicting with eachother - i.e. if
>> I make a *file* called /dev/tty and I write stuff to it, it might end
>> up in the file in stead of the device.
> Nope.  Even if the file exists, opening and writing will ever
> end up in the device.  That's not a problem even right now.
OK, let's keep it that way ;)

>> I wouldn't mind having the fhandler just not allow actual file vs. 
>> device conflicts - let the "magic" one override the actual one, and 
>> remove the actual one if it's offensive. /dev is no place for files 
>> anyway - it's like storing data in a void, storing icecream in a 
>> volcano: it doesn't last, it's not a good idea, and noone in his/her 
>> right mind would do it.. Symlinks are another matter, but the same 
>> precedence would apply: symlinks are meant to make life a bit easier, 
>> but don't contain any actual data, so if an magic dir would conflict 
>> with a symlink, the symlink would have to go..
> IMO it doesn't matter.  Files are listed as files, symlinks as
> symlinks.  If somebody creates a file called like a device
> (which is only possible outside of Cygwin processes) it will
> exist but has no further influence except, perhaps, that the
> corresponding device will be listed twice.
I didn't know Cygwin was that safe :)
So, if I understand correctly, devices *always* take precedence over 
files? Conflicts between them are *absolutely* impossible?
Just making sure - seems too good to be true :)

>> In the case of both /cygdrive and /registry, I simply wouldn't
>> allow the existance of real files - though Win32 will mess that up,
>> ofcourse.
> Yep, that's it.  You can't prevent it.  The question is just if
> the fhandler has to list it or not.
In the case of real file where they're not supposed to be, I'd say not: 
make them completely invisible. They're not supposed to be there - 
ignore them. No stat(), no listing, nothing.
People will probably whine about it though.. (Q: "I put a file in 
/registry but I can't fopen() it!" A: "http://www.tuxedo.org/~esr/faqs/smart-questions.html";) 

Greetz!

Ronald


--
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/


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