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 Mar  1 20:13, Christian Franke wrote:
> Attached is version 2 of the patch, including an update of utils.sgml
> 
> REG_BINARY can now be ether read as binary from stdin:
> 
> $ echo 0: 01 02 FE FF | xxd -r | regtool -b set KEY/BINVALUE -
> 
> $ regtool get KEY/BINVALUE | regtool -b set KEY/BINVALUE -
> 
> or specified as hex arguments:
> 
> $ regtool -b set KEY/BINVALUE 01 02 FE FF
> 
> $ x=$(regtool -b get KEY/BINVALUE)
> $ regtool -b set KEY/BINVALUE $x
> 
> 
> The load/unload actions are unchanged.
> 
> Christian
> 
> =====================
> 
> 2006-03-01  Christian Franke <franke@computer.org>
> 
>        * regtool.cc: Add actions load/unload and option -b, --binary.
>        * utils.sgml (regtool): Document it.

Your patch looks pretty good to me, but I have a few minor nits.

First, be a bit more verbose in your ChangeLog entry.  Add explicit
entries for each changed function or global datastructure.

> retrieving revision 1.19
> diff -u -r1.19 regtool.cc

Could you please use diff -up?  It helps (at least me) navigating through
a patch.

> +	  cygwin_conv_to_win32_path(argv[1], win32_path);

This happens a couple of times.  When you're calling functions, could
you please always add a space between the function name and the opening
parenthesis?

> +	  rv = RegLoadKey(base, n, win32_path);

Ditto, etc.

>    //printf("key `%s' value `%s'\n", n, value);

Why is this printf commented out?  If it's not needed, please remove.

> @@ -577,7 +647,14 @@
>    switch (vtype)
>      {
>      case REG_BINARY:
> -      fwrite (data, dsize, 1, stdout);
> +      if (key_type == KT_BINARY)	// hack

Hack?  Why hack?  Otherwise, please remove this comment.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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