delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/06/11:57:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020206082639.00a9eb48@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 06 Feb 2002 08:57:06 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: /dev/registry
In-Reply-To: <032a01c1af00$bde8dca0$a7eb0544@CX535256D>
References: <F119CHnbNWIWGjBM6VN000137e9 AT hotmail DOT com>
Mime-Version: 1.0

Barubary,

The motivation for a file-system reflection of the Windows registry is to 
open it up to programs not written in a Windows native language (C, C++, 
VB, etc.). Doing this would give all manner of scripts (shell, Perl, 
Python, TCL, etc.) access to the registry in one fell swoop.

That is one of the beautiful things about the Unix approach of fitting so 
much of a system's facilities into the unified framework of the file 
system. As the discussion has shown, however, if the underlying facility is 
not a good match for Unix's file model, this approach falls down. The 
Windows registry appears to be at the boundary of this issue, given the 
typed nature of its entries. The suffix approach or, perhaps, a terminal 
directory holding entries like ".dword" or ".sz" would presumably suffice.

The suggestion about ioctl() begs the question of where to get the file 
descriptor to which to apply the ioctl() call, and does not open the 
registry to scripting languages that have no direct access to the Cygwin or 
Windows APIs. It does not really simplify the task of adding the ability to 
Cygwin, but obscures the basic access behind the obscure and overloaded 
catch-all interface that is ioctl(). It is true that this would make 
inadvertent registry corruption less likely, but it only by virtue of 
making so much less accessible.

Randall Schulz
Mountain View, CA USA


At 03:23 2002-02-06, Barubary wrote:
>Why can't this /dev/registry stuff be just an ioctl()?  Open the 
>/dev/registry node for the appropriate access, then use some ioctl()'s to 
>read and write it.  Put the /dev/null entry points for the read and write 
>handlers for /dev/registry and you won't have that accidental corruption 
>from cat.
>
>By the way, if you're using Cygwin, why can't you just call 
>RegQueryValueExW and friends yourself?  You're a Win32 process anyway, and 
>no UNIX has such a thing - don't care about portability.
>
>-- Barubary


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