summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/regtree.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-13 12:26:03 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 23:17:59 +0200
commit92e1574d3ddb0edf3173e18c6e0dfc4974bedcf5 (patch)
treeb3a31c12c774d82e40e4cc9d3726c95a3ecac5fc /source4/lib/registry/tools/regtree.c
parent5bf62260505d1e8dfddcb3acef69ef0217841a3f (diff)
downloadsamba-92e1574d3ddb0edf3173e18c6e0dfc4974bedcf5.tar.gz
samba-92e1574d3ddb0edf3173e18c6e0dfc4974bedcf5.tar.bz2
samba-92e1574d3ddb0edf3173e18c6e0dfc4974bedcf5.zip
Registry tools "regshell" and "regtree": Small fixup's
I fixed up my fault regarding the handling of the default value (if it doesn't exist it hasn't the index number zero and you get immediately the subvalues). Then I corrected an error in regshell to find the right registry context.
Diffstat (limited to 'source4/lib/registry/tools/regtree.c')
-rw-r--r--source4/lib/registry/tools/regtree.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 17a9163adc..2175f9c9d3 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -38,8 +38,7 @@ static void print_tree(int level, struct registry_key *p,
bool fullpath, bool novals)
{
struct registry_key *subkey;
- const char *valuename;
- const char *keyname;
+ const char *valuename, *keyname;
uint32_t valuetype;
DATA_BLOB valuedata;
struct security_descriptor *sec_desc;
@@ -73,17 +72,7 @@ static void print_tree(int level, struct registry_key *p,
if (!novals) {
mem_ctx = talloc_init("print_tree");
- /* default value */
- if (W_ERROR_IS_OK(reg_key_get_value_by_index(mem_ctx, p, 0,
- &valuename, &valuetype, &valuedata))) {
- int j;
- for(j = 0; j < level+1; j++) putchar(' ');
- printf("%s\n", reg_val_description(mem_ctx,
- lp_iconv_convenience(cmdline_lp_ctx),
- "(Default)", valuetype, valuedata));
- }
- /* other values */
- for(i = 1; W_ERROR_IS_OK(error = reg_key_get_value_by_index(
+ for(i = 0; W_ERROR_IS_OK(error = reg_key_get_value_by_index(
mem_ctx, p, i, &valuename, &valuetype, &valuedata));
i++) {
int j;