delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/24/15:25:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Ronald Landheer" <info AT rlsystems DOT net>
To: "Corinna Vinschen" <cygwin AT cygwin DOT com>
Subject: RE: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff)
Date: Mon, 24 Sep 2001 21:24:23 +0200
Message-ID: <NFBBLOMHALONCDMPGBLFKEELCCAA.info@rlsystems.net>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <20010924150136.V17037@cygbert.vinschen.de>
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id PAA10751

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019