This is the mail archive of the
mailing list for the Cygwin project.
- From: Randall R Schulz <rrschulz at cris dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 06 Feb 2002 08:57:06 -0800
- Subject: Re: /dev/registry
- References: <F119CHnbNWIWGjBM6VN000137e9@hotmail.com>
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.
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
>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.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html