summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-09-11 01:06:57 +0000
committerTomek CEDRO <cederom@tlen.pl>2011-09-11 01:06:57 +0000
commit97f56ea68813cf67711be01c9dcced73c194d1aa (patch)
tree8918bee00ac2aa01663e3b088b75960907d9fac2
parent7fafb0add5d07540964cde734f41aff650eafefc (diff)
downloadopenocd+libswd-97f56ea68813cf67711be01c9dcced73c194d1aa.tar.gz
openocd+libswd-97f56ea68813cf67711be01c9dcced73c194d1aa.tar.bz2
openocd+libswd-97f56ea68813cf67711be01c9dcced73c194d1aa.tar.xz
openocd+libswd-97f56ea68813cf67711be01c9dcced73c194d1aa.zip
transport/swd: Minor fix - messages automatic newline termination.
-rw-r--r--src/transport/swd_libswd_drv_openocd.c2
-rw-r--r--src/transport/swd_tcl.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/swd_libswd_drv_openocd.c b/src/transport/swd_libswd_drv_openocd.c
index 26e147b4..d8207d94 100644
--- a/src/transport/swd_libswd_drv_openocd.c
+++ b/src/transport/swd_libswd_drv_openocd.c
@@ -277,7 +277,7 @@ int swd_log(swd_ctx_t *swdctx, swd_loglevel_t loglevel, char *msg, ...){
va_list ap;
va_start(ap, msg);
// Calling OpenOCD log functions here will cause program crash (va recurrent).
- res=vprintf(msg, ap);
+ res=vprintf(msg, ap); printf("\n");
va_end(ap);
return SWD_OK;
}
diff --git a/src/transport/swd_tcl.c b/src/transport/swd_tcl.c
index 9389f66c..afb472fc 100644
--- a/src/transport/swd_tcl.c
+++ b/src/transport/swd_tcl.c
@@ -49,7 +49,7 @@ COMMAND_HANDLER(handle_swd_loglevel)
switch (CMD_ARGC) {
case 0:
- LOG_USER("Current SWD LogLevel[%d..%d] is: %d (%s)\n", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, swdctx->config.loglevel, swd_log_level_string(swdctx->config.loglevel));
+ LOG_USER("Current SWD LogLevel[%d..%d] is: %d (%s)", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, swdctx->config.loglevel, swd_log_level_string(swdctx->config.loglevel));
break;
case 1:
// We want to allow inherit current OpenOCD's debuglevel.
@@ -58,7 +58,7 @@ COMMAND_HANDLER(handle_swd_loglevel)
LOG_ERROR("LogLevel inherit failed!");
return ERROR_FAIL;
} else {
- LOG_USER("Using OpenOCD settings, SWD LogLevel[%d..%d] set to: %d (%s)\n", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, loglevel, swd_log_level_string(loglevel));
+ LOG_USER("Using OpenOCD settings, SWD LogLevel[%d..%d] set to: %d (%s)", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, loglevel, swd_log_level_string(loglevel));
return ERROR_OK;
}
}
@@ -67,7 +67,7 @@ COMMAND_HANDLER(handle_swd_loglevel)
if (loglevel<SWD_LOGLEVEL_MIN || loglevel>SWD_LOGLEVEL_MAX) {
LOG_ERROR("Bad SWD LogLevel value!");
return ERROR_FAIL;
- } else LOG_USER("Setting SWD LogLevel[%d..%d] to: %d (%s)\n", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, loglevel, swd_log_level_string(loglevel));
+ } else LOG_USER("Setting SWD LogLevel[%d..%d] to: %d (%s)", SWD_LOGLEVEL_MIN, SWD_LOGLEVEL_MAX, loglevel, swd_log_level_string(loglevel));
if(swd_log_level_set(swdctx, loglevel)<0){
return ERROR_FAIL;
} else return ERROR_OK;