This is the mail archive of the 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]
Other format: [Raw text]

Re: /dev/registry


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:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]