From aed95ba66f29b9536e99027fab5327548b984b70 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 11 Oct 2004 13:57:30 +0000 Subject: r2913: - Don't print hive name if it is NULL (regtree) - Initialise hive name (reg_interface) - Fix LDB backend (enumerating keys works now!) (This used to be commit 5086d6b2494f236ef67096b2dd4da4f7402a65c5) --- source4/lib/registry/tools/regtree.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/tools') diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c index 9748ca3438..bc0055a891 100644 --- a/source4/lib/registry/tools/regtree.c +++ b/source4/lib/registry/tools/regtree.c @@ -32,10 +32,13 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals) for(i = 0; i < l; i++) putchar(' '); /* Hive name */ - if(p->hive->root == p) printf("%s\n", p->hive->name); - else if(!p->name) printf("\n"); - else if(fullpath) printf("%s\n", p->path); - else printf("%s\n", p->name); + if(p->hive->root == p) { + if(p->hive->name) printf("%s\n", p->hive->name); else printf("\n"); + } else { + if(!p->name) printf("\n"); + if(fullpath) printf("%s\n", p->path); + else printf("%s\n", p->name); + } mem_ctx = talloc_init("print_tree"); for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, p, i, &subkey)); i++) { -- cgit