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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user