There is no particular reason to invoke jtag_interface_quit()
on the atexit() handler, it just makes the code more obtuse
and stops other legitimate usage of atexit().
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
return ERROR_OK;
}
-static void exit_handler(void)
-{
- jtag_interface_quit();
-}
static int log_target_callback_event_handler(struct target *target, enum target_event event, void *priv)
{
initialized = 1;
- atexit(exit_handler);
-
command_context_mode(CMD_CTX, COMMAND_EXEC);
if (target_init(CMD_CTX) != ERROR_OK)
/* free commandline interface */
command_done(cmd_ctx);
+ jtag_interface_quit();
+
return ret;
}