public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: /dev/registry
@ 2002-02-04 19:57 Gareth Pearce
  2002-02-06  3:23 ` /dev/registry Barubary
  0 siblings, 1 reply; 13+ messages in thread
From: Gareth Pearce @ 2002-02-04 19:57 UTC (permalink / raw)
  To: g.r.vansickle, cygwin


> >
> >
> > How about adding a /dev/registry fhandler to Cygwin? Registry keys would 
>be
> > directories and values in the registry files. I'm willing to try coding 
>this
> > if people think it's a good idea. It allows shell scripts to easily 
>access
> > registry keys as well as programs.
> >
>
>Well, it looks like I'll be the only one, but this sounds to me like an 
>insanely
>*BAD* idea.  It seems to me to be hard enough to keep the Windows registry 
>in
>one piece even if you don't dink with it; I shudder to think what horrors 
>await
>sombody with fat fingers and an itchy TAB finger (i.e. me):
>
>cat HundredsOfMBsOfCrap > 
>/dev/r[TAB-oops-I-meant...well-something-else-anyway]
>
>I'm trying to think where this would actually be useful, but I'm drawing a
>blank.  It seems to me that the registry should have at least a slightly 
>higher
>barrier to entry than the command line.
>

umm /dev/registry I am assuming you would think would act like a file? - 
people were suggesing /proc/registry - and as far as I could tell it would 
act like a directory - so your 'cat junk' would just fail with invalid 
target...
maybe you meant cat hundredsofmbofjunk > 
/proc/registry/HKLM/User/Software/Windows/Current/blah/ding/shiznat.sz
?
which i dont see you manageing no matter how hard you try ...

Gareth

>--
>Gary R. Van Sickle
>Brewer.  Patriot.
>
>
>--
>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/
>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /dev/registry
  2002-02-04 19:57 /dev/registry Gareth Pearce
@ 2002-02-06  3:23 ` Barubary
  2002-02-06  3:47   ` /proc (was: Re: /dev/registry) Chris January
  2002-02-06  8:56   ` /dev/registry Randall R Schulz
  0 siblings, 2 replies; 13+ messages in thread
From: Barubary @ 2002-02-06  3:23 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* /proc (was: Re: /dev/registry)
  2002-02-06  3:23 ` /dev/registry Barubary
@ 2002-02-06  3:47   ` Chris January
  2002-02-06  4:24     ` Ralf Habacker
  2002-02-06 16:51     ` Warren Young
  2002-02-06  8:56   ` /dev/registry Randall R Schulz
  1 sibling, 2 replies; 13+ messages in thread
From: Chris January @ 2002-02-06  3:47 UTC (permalink / raw)
  To: cygwin

> 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.
1. it's difficult to accidentally cat to a key considering the length of the
names  -
/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/S
hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\} is a bit
hard to type in by accident...
2. it makes scripting easier
3. ** adding /proc/registry means adding /proc and once a /proc virtual fs
is established, other /proc entries can be added a lot more easily
4. it gives you an alternative to regedit and friends
I almost have a read-only version of this working. I don't see why their
should be objections to this since you can't screw your registry up in any
way. I'll think
about how to add write capabilities later.
I'll probably add some entries to /proc - ones commonly found on UNIX
platforms maybe. Anyone have any favourites they wish to see?

Regards
Chris


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: /proc (was: Re: /dev/registry)
  2002-02-06  3:47   ` /proc (was: Re: /dev/registry) Chris January
@ 2002-02-06  4:24     ` Ralf Habacker
  2002-02-06 16:54       ` Chris January
  2002-02-06 16:51     ` Warren Young
  1 sibling, 1 reply; 13+ messages in thread
From: Ralf Habacker @ 2002-02-06  4:24 UTC (permalink / raw)
  To: cygwin

> 
> > 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.
> 1. it's difficult to accidentally cat to a key considering the length of the
> names  -
> /proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/S
> hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\} is a bit
> hard to type in by accident...
> 2. it makes scripting easier
> 3. ** adding /proc/registry means adding /proc and once a /proc virtual fs
> is established, other /proc entries can be added a lot more easily

This seems good to me :-)

> 4. it gives you an alternative to regedit and friends
> I almost have a read-only version of this working. I don't see why their
> should be objections to this since you can't screw your registry up in any
> way. I'll think about how to add write capabilities later.
> I'll probably add some entries to /proc - ones commonly found on UNIX
> platforms maybe. Anyone have any favourites they wish to see?
> 
> Regards
> Chris
> 
> 
> --
> 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/
> 
> 


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /dev/registry
  2002-02-06  3:23 ` /dev/registry Barubary
  2002-02-06  3:47   ` /proc (was: Re: /dev/registry) Chris January
@ 2002-02-06  8:56   ` Randall R Schulz
  2002-02-08 23:42     ` /dev/registry Robert Collins
  1 sibling, 1 reply; 13+ messages in thread
From: Randall R Schulz @ 2002-02-06  8:56 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /proc (was: Re: /dev/registry)
  2002-02-06  3:47   ` /proc (was: Re: /dev/registry) Chris January
  2002-02-06  4:24     ` Ralf Habacker
@ 2002-02-06 16:51     ` Warren Young
  1 sibling, 0 replies; 13+ messages in thread
From: Warren Young @ 2002-02-06 16:51 UTC (permalink / raw)
  To: Cygwin-L

Chris January wrote:
> 
> I'll probably add some entries to /proc - ones commonly found on UNIX
> platforms maybe. Anyone have any favourites they wish to see?

I don't know about "favorite", but the only one that's even close to
standardized across Unices is /proc/<pid>.  And even that is nonstandard
everywhere: it's a bunch of text files on Linux, and a bunch of binary
files by different names under recent SysVR4.  (Or SVR5, as Caldera nee
SCO insists on calling it.)

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /proc (was: Re: /dev/registry)
  2002-02-06  4:24     ` Ralf Habacker
@ 2002-02-06 16:54       ` Chris January
  2002-02-07  1:57         ` Pavel Tsekov
  0 siblings, 1 reply; 13+ messages in thread
From: Chris January @ 2002-02-06 16:54 UTC (permalink / raw)
  To: cygwin

> > 1. it's difficult to accidentally cat to a key considering the length of
the
> > names  -
> >
/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/S
> > hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\} is a
bit
> > hard to type in by accident...
At the moment, I have called the default key value, "(default"), the same as
regedit. Does anyone have any objections to this (and if so a better
suggestion)? The brackets can't be typed into bash without being quoted;
this might become a bit of a pain.

Regards
Chris



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /proc (was: Re: /dev/registry)
  2002-02-06 16:54       ` Chris January
@ 2002-02-07  1:57         ` Pavel Tsekov
  0 siblings, 0 replies; 13+ messages in thread
From: Pavel Tsekov @ 2002-02-07  1:57 UTC (permalink / raw)
  To: Chris January; +Cc: cygwin

Is the source code for this functionality accessible for download
somewhere ?

Chris January wrote:

>>>1. it's difficult to accidentally cat to a key considering the length of
>>>
> the
> 
>>>names  -
>>>
>>>
> /proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/S
> 
>>>hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\} is a
>>>
> bit
> 
>>>hard to type in by accident...
>>>
> At the moment, I have called the default key value, "(default"), the same as
> regedit. Does anyone have any objections to this (and if so a better
> suggestion)? The brackets can't be typed into bash without being quoted;
> this might become a bit of a pain.



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /dev/registry
  2002-02-06  8:56   ` /dev/registry Randall R Schulz
@ 2002-02-08 23:42     ` Robert Collins
  2002-02-09 10:43       ` /dev/registry Christopher Faylor
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Collins @ 2002-02-08 23:42 UTC (permalink / raw)
  To: cygwin, Randall R Schulz


===
----- Original Message -----
From: "Randall R Schulz" <rrschulz@cris.com>
> 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.

Yah. I've been quite on this one. I'd like to point out that Cygwin has
had a patch for /dev/registry some time ago. I support a good
implementation of this, and like the .dword etc suffix idea. I also
think that a mount command should be *required* to active /dev/registry,
and that a read-only and read-write mode should be provided... to allow
for users with different needs, allowing read only requirements to
result in lower risk.

Rob


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /dev/registry
  2002-02-08 23:42     ` /dev/registry Robert Collins
@ 2002-02-09 10:43       ` Christopher Faylor
  2002-02-09 13:17         ` /dev/registry Robert Collins
  0 siblings, 1 reply; 13+ messages in thread
From: Christopher Faylor @ 2002-02-09 10:43 UTC (permalink / raw)
  To: cygwin

On Sat, Feb 09, 2002 at 06:43:15PM +1100, Robert Collins wrote:
>
>===
>----- Original Message -----
>From: "Randall R Schulz" <rrschulz@cris.com>
>>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.
>
>Yah.  I've been quite on this one.  I'd like to point out that Cygwin
>has had a patch for /dev/registry some time ago.

I just did a search and I can't see any formal submittal of a patch.

Was this your patch?  I seem to find some reference to this in a
"work in progress" version of your UMSDOS stuff.

cgf

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /dev/registry
  2002-02-09 10:43       ` /dev/registry Christopher Faylor
@ 2002-02-09 13:17         ` Robert Collins
  0 siblings, 0 replies; 13+ messages in thread
From: Robert Collins @ 2002-02-09 13:17 UTC (permalink / raw)
  To: cygwin


===
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin@cygwin.com>
> >Yah.  I've been quite on this one.  I'd like to point out that Cygwin
> >has had a patch for /dev/registry some time ago.
>
> I just did a search and I can't see any formal submittal of a patch.
>
> Was this your patch?  I seem to find some reference to this in a
> "work in progress" version of your UMSDOS stuff.

Not mine. And it was never submitted formally. Someone had it floating
on a webpage someone where.

Rob


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: /proc (was: Re: /dev/registry)
  2002-02-06 17:04 /proc (was: Re: /dev/registry) Stephan Mueller
@ 2002-02-06 17:38 ` Michael A Chase
  0 siblings, 0 replies; 13+ messages in thread
From: Michael A Chase @ 2002-02-06 17:38 UTC (permalink / raw)
  To: Stephan Mueller, Chris January, cygwin

Just another log on the fire, the Perl registry modules use "" for the
(default) value.

Even so, I'd lean toward "@" since it's hard to name a file "".

You may need to have an ioctl() to change the key separator.  '\' would
probably be ok, but difficult.  The problem with '/' might make it hard to
handle the cygwin mount tables.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.htm
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
----- Original Message -----
From: "Stephan Mueller" <smueller@microsoft.com>
To: "Chris January" <chris@atomice.net>; <cygwin@cygwin.com>
Sent: Wednesday, February 06, 2002 17:00
Subject: RE: /proc (was: Re: /dev/registry)


Another suggestion (I won't presume to say better):

.reg files refer to this value as @.  E.g.

REGEDIT4

[HKEY_CURRENT_USER\AppEvents\Schemes]
@=".current"

stephan();


-----Original Message-----
From: Chris January [mailto:chris@atomice.net]
Sent: Wednesday, February 06, 2002 4:56 PM
To: cygwin@cygwin.com
Subject: Re: /proc (was: Re: /dev/registry)


> > 1. it's difficult to accidentally cat to a key considering the
> > length of
the
> > names  -
> >
/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersi
on/S
> > hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\}
> > is a
bit
> > hard to type in by accident...
At the moment, I have called the default key value, "(default"), the
same as regedit. Does anyone have any objections to this (and if so a
better suggestion)? The brackets can't be typed into bash without being
quoted; this might become a bit of a pain.




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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: /proc (was: Re: /dev/registry)
@ 2002-02-06 17:04 Stephan Mueller
  2002-02-06 17:38 ` Michael A Chase
  0 siblings, 1 reply; 13+ messages in thread
From: Stephan Mueller @ 2002-02-06 17:04 UTC (permalink / raw)
  To: Chris January, cygwin

Another suggestion (I won't presume to say better):

.reg files refer to this value as @.  E.g.

	REGEDIT4
	
	[HKEY_CURRENT_USER\AppEvents\Schemes]
	@=".current"

stephan();


-----Original Message-----
From: Chris January [mailto:chris@atomice.net] 
Sent: Wednesday, February 06, 2002 4:56 PM
To: cygwin@cygwin.com
Subject: Re: /proc (was: Re: /dev/registry)


> > 1. it's difficult to accidentally cat to a key considering the 
> > length of
the
> > names  -
> >
/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersi
on/S
> > hell\ Extensions/Approved/\{BDEADF00-C265-11d0-BCED-00A0C90AB50F\} 
> > is a
bit
> > hard to type in by accident...
At the moment, I have called the default key value, "(default"), the
same as regedit. Does anyone have any objections to this (and if so a
better suggestion)? The brackets can't be typed into bash without being
quoted; this might become a bit of a pain.

Regards
Chris



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


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-02-09 21:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-04 19:57 /dev/registry Gareth Pearce
2002-02-06  3:23 ` /dev/registry Barubary
2002-02-06  3:47   ` /proc (was: Re: /dev/registry) Chris January
2002-02-06  4:24     ` Ralf Habacker
2002-02-06 16:54       ` Chris January
2002-02-07  1:57         ` Pavel Tsekov
2002-02-06 16:51     ` Warren Young
2002-02-06  8:56   ` /dev/registry Randall R Schulz
2002-02-08 23:42     ` /dev/registry Robert Collins
2002-02-09 10:43       ` /dev/registry Christopher Faylor
2002-02-09 13:17         ` /dev/registry Robert Collins
2002-02-06 17:04 /proc (was: Re: /dev/registry) Stephan Mueller
2002-02-06 17:38 ` Michael A Chase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).