summaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-19 08:38:17 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-20 14:52:56 -0800
commit9e9633c6b98cc9243ae78cd12ab657d041eaa73e (patch)
treed9ca32ad190555f1dd853c60044dff107087aef6 /src/openocd.c
parent73c6e3bb18326050acc8908b561443a7b37549bb (diff)
downloadopenocd_libswd-9e9633c6b98cc9243ae78cd12ab657d041eaa73e.tar.gz
openocd_libswd-9e9633c6b98cc9243ae78cd12ab657d041eaa73e.tar.bz2
openocd_libswd-9e9633c6b98cc9243ae78cd12ab657d041eaa73e.tar.xz
openocd_libswd-9e9633c6b98cc9243ae78cd12ab657d041eaa73e.zip
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.c2
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);