From bf52e242f53aeaac33eea69fbdfb3477634b90fb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 22 May 2004 18:49:25 +0000 Subject: 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) --- source4/lib/registry/tools/regtree.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/tools/regtree.c') 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; } -- cgit