forked from auracaster/openocd
remove target_type register_command callback
Uses chaining of command_registration structures to eliminate all target_type register_callback routines. Exports the command_handler registration arrays for those target types that are used by others.
This commit is contained in:
@@ -2873,7 +2873,13 @@ static const struct command_registration arm7_9_any_command_handlers[] = {
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
static const struct command_registration arm7_9_command_handlers[] = {
|
||||
const struct command_registration arm7_9_command_handlers[] = {
|
||||
{
|
||||
.chain = arm_command_handlers,
|
||||
},
|
||||
{
|
||||
.chain = etm_command_handlers,
|
||||
},
|
||||
{
|
||||
.name = "arm7_9",
|
||||
.mode = COMMAND_ANY,
|
||||
@@ -2882,10 +2888,3 @@ static const struct command_registration arm7_9_command_handlers[] = {
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
int arm7_9_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
armv4_5_register_commands(cmd_ctx);
|
||||
etm_register_commands(cmd_ctx);
|
||||
return register_commands(cmd_ctx, NULL, arm7_9_command_handlers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user