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)


Corinna wrote:

>> Is that more or less clear?
> More or less.  How shall that work correctly?  Assume a user
> creates a /dev/tty file.  ls -l /dev/tty results in
> 
> crw-rw-rw-    1 root     root       5,   1 Sep 24 14:54 /dev/tty
> 
> and the listing of the directory shows that entry, too.  Then the
> fhandler wants to list the devices.  It would list tty again unless
> it would check the listing of the real device for legal device
> entries and marks tty as already listed or so.
It would have to do that anyway (IMHO): as ye never know what a user 
might be up to, it would have to check whether actual files & 
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.

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

Perhaps a force option/flag would be nice for this, though - so as to 
protect the unwitting (non-reading; documentation-illiterate) user a 
bit..

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

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]