This is the mail archive of the cygwin-patches 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: [Patch] regtool: Add load/unload commands and --binary option


Corinna Vinschen wrote:
I applied the patch.

Thanks.


I just had to reformat your ChangeLog slightly
(a TAB before all lines, no extra indentation for lines which don't
start with a '*').
SeaMonkey expands tabs to spaces...
Will use attachment for ChangeLog next time.

Btw., since you seem to be interested in hacking the registry... would
you also be interested to introduce registry write access below
/proc/registry inside of the Cygwin DLL? That would be extra cool.

In fact I had the idea to hack the registry, in particular fix the read access to registry values starting with backslash:


$ cd /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/MountedDevices
$ ls
...
\DosDevices\C:
\DosDevices\D:
...
$ cat \\DosDevices\\C:
cat: \DosDevices\C:: No such file or directory

Using a URL-like "%XX" encoding for invalid characters (/\?%) may be the right thing to do.

$ ls
...
%5cDosDevices%5cC:

I found that all standard ascii chars except ^ % ` are used in value names

I'm not quite sure how to handle the mapping from file types to
registry key types, but there might be some simple way which I'm just
too blind to see.

Because POSIX has no notion about file types, the type has to be somehow encoded into the name if a new key is created.
The major drawback of this approach is that the read path is different from the write path.


I would suggest to add a second R/W view to the registry where both path are identical.
A type extension should be added via a rarely used character:


$ ls /proc/registry/SUBKEY
reg_sz_value
reg_binary_value
reg_dword_value

$ ls /proc/registry-rw/SUBKEY
reg_sz_value,sz
reg_binary_value,bin
reg_dword_value,dword

Then you should have the ability to copy subkeys to file trees and vice versa:
cp -r /dev/registry-rw/SUBKEY /tmp/SUBKEY
rm -r /dev/registry-rw/SUBKEY
cp -r /tmp/SUBKEY /dev/registry-rw/SUBKEY


Suggest to start a new thread for this discussion....

Christian


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