1 Mar 2006 20:13
Re: [Patch] regtool: Add load/unload commands and --binary option
Christian Franke <Christian.Franke <at> t-online.de>
2006-03-01 19:13:56 GMT
2006-03-01 19:13:56 GMT
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 <at> computer.org>
* regtool.cc: Add actions load/unload and option -b, --binary.
* utils.sgml (regtool): Document it.
Index: regtool.cc ===================================================================(Continue reading)
Uncommenting this line during testing was helpful, so I left it untouched.
>> <at> <at> -577,7 +647,14 <at> <at>
>> switch (vtype)
>> {
>> case REG_BINARY:
>> - fwrite (data, dsize, 1, stdout);
>> + if (key_type == KT_BINARY) // hack
>>
>
> Hack? Why hack? Otherwise, please remove this comment.
>
Because {re|mis}using "set" key_type for as a "get" option has been
RSS Feed