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)


Hi Liu,

I've directed the mail back to the list - it seems to belong there.

>>> I don't want to define special requirements here.  I'm just thinking
>>> that a file system fhandler like /dev should list the real files
>>> (if they exist) _and_ the virtual devices.  I don't think that's
>>> a requirement for a /cygdrive fhandler or a /registry fhandler.
>>> They could but they don't have to.
>> 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.
> fhandlers only handle files, but they don't handle directories. 
> directory enumeration is hard coded in the opendir/readdir calls in 
> path.cc ...
I know - after all, that's what they're named for :). Would you rather 
I'd call them dhandlers? I don't see much of a difference, and I think 
the intentions - i.e. what we were saying - was clear anyway.
Though, ofcourse, clarity is something that should not be lacking when 
talking about technical details of an upcoming implementation.. (point 
taken)

> perhaps we should abstract the implementation of those two calls the 
> same way as we abstracted fhandlers. say, we'll call it either
> dhandlers (directory handlers) or mhandlers (mount handlers). in this
> setup, the mount table (in registry) would specify the type of mount
> (eg, the handler). i would advocate having dhandlers/mhandlers
> borrowing the same design as fhandlers.
As would I - which is why (I think) we've been calling them fhandlers :)

> first of all, do you people like calling it dhandlers better or 
> mhandlers better?
What's in a name? I have no problem with just keeping the "fhandlers" as 
it's still the file system we're handling - be it virtual, magic or 
otherwise. I see no reason to complicate matters with naming conventions 
for obscure reasons. Anyone who takes a look at the source code and/or 
the docs will know how it works, and whatever I implement will be 
commented in the code, and will probably be accompanied by a file "How 
do magic dirs work?". Other than that, this thread documents the design 
in detail, and if there's a lot of questions about it - which I highly 
doubt, because it's a Cygwin internal matter we're talking about - there 
can always be an FAQ entry. We'd need one if we'd call it dhandlers or 
mhandlers too, if we'd need one at all.

The key to clear programming is not in changing a letter of a name: it's 
in the documentation of both the source code and its functionality. 
Whether you call it fhandlers or dhandlers (or mhandlers) is, IMHO, a 
non-issue.

Ofcourse, I'm speaking for myself here, if the others (Chris, Corinna, 
Robert, Chuck) think it's better to give the beast a new name, by all 
means. Personally, I'm more interested in how it should work than what 
it should be called.

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]