remove register_commands from etm_capture_driver

Converts callback to an array of command_registration records.
Moves oocd_trace driver definition to end of file to eliminate
useless forward declaration.
This commit is contained in:
Zachary T Welch
2009-11-23 08:24:02 -08:00
parent 66ee303456
commit f74e2e033a
5 changed files with 17 additions and 31 deletions

View File

@@ -1471,8 +1471,9 @@ COMMAND_HANDLER(handle_etm_config_command)
{
if (strcmp(CMD_ARGV[4], etm_capture_drivers[i]->name) == 0)
{
int retval;
if ((retval = etm_capture_drivers[i]->register_commands(CMD_CTX)) != ERROR_OK)
int retval = register_commands(CMD_CTX, NULL,
etm_capture_drivers[i]->commands);
if (ERROR_OK != retval)
{
free(etm_ctx);
return retval;