summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/regtree.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-05-22 18:49:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:53:53 -0500
commitbf52e242f53aeaac33eea69fbdfb3477634b90fb (patch)
tree76b04dc95e3e7befd45180a661cd7f55d085701e /source4/lib/registry/tools/regtree.c
parent4e9d01c2a7cd044ac4b466a1039c9a7e3978d6ef (diff)
downloadsamba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.gz
samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.bz2
samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.zip
r825: - Introduce support for multiple roots (or 'hives')
- Clean up rpc backend (possible now that multiple hives are supported) (This used to be commit 8cd1b6bc70510fe576135a66351e9e3ea895c9ff)
Diffstat (limited to 'source4/lib/registry/tools/regtree.c')
-rw-r--r--source4/lib/registry/tools/regtree.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 477c63af2c..e583194a56 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -60,7 +60,7 @@ static void print_tree(int l, REG_KEY *p, int fullpath, int novals)
int main(int argc, char **argv)
{
- int opt;
+ int opt, i;
const char *backend = "dir";
const char *credentials = NULL;
poptContext pc;
@@ -91,10 +91,14 @@ static void print_tree(int l, REG_KEY *p, int fullpath, int novals)
}
poptFreeContext(pc);
- error = reg_get_root(h, &root);
- if(!W_ERROR_IS_OK(error)) return 1;
+ error = WERR_OK;
- print_tree(0, root, fullpath, no_values);
+ for(i = 0; W_ERROR_IS_OK(error); i++) {
+ error = reg_get_hive(h, i, &root);
+ if(!W_ERROR_IS_OK(error)) return 1;
+
+ print_tree(0, root, fullpath, no_values);
+ }
return 0;
}