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


On Wed, 25 Jan 2006, Corinna Vinschen wrote:

> On Jan 24 21:00, Christian Franke wrote:
> > Hi,
> >
> > the attached patch adds commands "load" and "unload" and options "-b,
> > --binary" to regtool.
> >
> > Load a registry hive from PATH into new SUBKEY:
> >
> > regtool load KEY\SUBKEY PATH
> >
> > Unload and remove SUBKEY later:
> >
> > regtool unload KEY\SUBKEY
> >
> > Print REG_BINARY value as hex:
> >
> > regtool -b get KEY\VALUE
> >
> > Set REG_BINARY value from hex args:
> >
> > regtool -b set KEY\VALUE XX XX XX XX ...
> >
> > [snip]
> > Thanks for any comment
>
> Thanks for this patch, it looks pretty useful.
> [snip]

I wonder if it would be better to use stdin/stdout for binary data (or
even add a -f option for set).  IMHO,

regtool -b get KEY1\\VALUE | regtool -b set KEY2\\VALUE

or

regtool -b get KEY1\\VALUE | regtool -b set -f - KEY2\\VALUE

looks cleaner than storing the hex encoding into a string...  If you want
a hex dump,

regtool -b get KEY1\\VALUE | od -t x1

will do it.  I'm not aware of any program that does the reverse
(hex dump->binary), but writing a perl script for that is trivial.

That said, I also think this functionality would be very useful.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


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