diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-19 08:38:17 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 14:52:56 -0800 |
commit | 9e9633c6b98cc9243ae78cd12ab657d041eaa73e (patch) | |
tree | d9ca32ad190555f1dd853c60044dff107087aef6 /src/openocd.c | |
parent | 73c6e3bb18326050acc8908b561443a7b37549bb (diff) |
refactor command registration
Refactors the command registration to use helpers to simplify the code.
The unregistration routines were made more flexible by allowing them
to operate on a single command, such that one can remove all of a
commands children in one step (perhaps before adding back a 'config'
subcommand that allows getting the others back). Eliminates a bit
of duplicated code and adds full API documentation for these routines.
Diffstat (limited to 'src/openocd.c')
-rw-r--r-- | src/openocd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openocd.c b/src/openocd.c index b7781a6b..8e8ceac4 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -278,7 +278,7 @@ int openocd_main(int argc, char *argv[]) httpd_stop(); #endif - unregister_all_commands(cmd_ctx); + unregister_all_commands(cmd_ctx, NULL); /* free commandline interface */ command_done(cmd_ctx); |