Author: jelmer
Date: 2007-08-10 16:01:47 +0000 (Fri, 10 Aug 2007)
New Revision: 24315

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24315

Log:
Track path correctly in regshell.

Modified:
   branches/4.0-regwrite/
   branches/4.0-regwrite/BRANCH.TODO
   branches/4.0-regwrite/source/lib/registry/tools/regshell.c


Changeset:

Property changes on: branches/4.0-regwrite
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-regwrite/BRANCH.TODO
===================================================================
--- branches/4.0-regwrite/BRANCH.TODO   2007-08-10 14:01:14 UTC (rev 24314)
+++ branches/4.0-regwrite/BRANCH.TODO   2007-08-10 16:01:47 UTC (rev 24315)
@@ -1,6 +1,5 @@
 The following things still need to be fixed before this branch 
 can be merged:
-- regshell: generate correct path
 - RPC-WINREG
 - tests for diff functionality
 - test for classname and last_mod_time being kept

Modified: branches/4.0-regwrite/source/lib/registry/tools/regshell.c
===================================================================
--- branches/4.0-regwrite/source/lib/registry/tools/regshell.c  2007-08-10 
14:01:14 UTC (rev 24314)
+++ branches/4.0-regwrite/source/lib/registry/tools/regshell.c  2007-08-10 
16:01:47 UTC (rev 24315)
@@ -146,8 +146,9 @@
                }
        } 
 
-       /* FIXME: Set ctx->path, ctx->current */
+       ctx->path = talloc_asprintf(ctx, "%s\\%s", ctx->path, argv[1]);
        printf("Current path is: %s\n", ctx->path);
+       ctx->current = new;
        
        return WERR_OK;
 }
@@ -481,6 +482,7 @@
        } else if (file != NULL) {
                ctx->current = reg_common_open_file(file, cmdline_credentials);
                ctx->registry = ctx->current->context;
+               ctx->path = talloc_strdup(ctx, "");
        } else {
                ctx->registry = reg_common_open_local(cmdline_credentials);
        }
@@ -497,6 +499,7 @@
                                                                                
 reg_predefined_keys[i].handle, 
                                                                                
 &ctx->current);
                        if (W_ERROR_IS_OK(err)) {
+                               ctx->path = talloc_strdup(ctx, 
reg_predefined_keys[i].name);
                                break;
                        } else {
                                ctx->current = NULL;

Reply via email to