summaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
authorEric Wetzel <thewetzel@gmail.com>2011-01-05 14:24:54 -0500
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-01-05 21:46:12 +0100
commita665ef716a9a90c30fb15e1f979845b3438a7251 (patch)
tree9f5b7f916393d21b2644541bc5e755f0233f96b1 /src/jtag
parent0cd84000daab056dea61eb9d60cca538a3716acd (diff)
downloadopenocd_libswd-a665ef716a9a90c30fb15e1f979845b3438a7251.tar.gz
openocd_libswd-a665ef716a9a90c30fb15e1f979845b3438a7251.tar.bz2
openocd_libswd-a665ef716a9a90c30fb15e1f979845b3438a7251.tar.xz
openocd_libswd-a665ef716a9a90c30fb15e1f979845b3438a7251.zip
nit: do not add \n at end of LOG_ERROR
Fixed in many other places, and submitted in response to Øyvind's invitation.
Diffstat (limited to 'src/jtag')
-rw-r--r--src/jtag/drivers/arm-jtag-ew.c6
-rw-r--r--src/jtag/drivers/ft2232.c4
-rw-r--r--src/jtag/drivers/jlink.c2
-rw-r--r--src/jtag/drivers/rlink.c30
-rw-r--r--src/jtag/drivers/usb_blaster.c2
5 files changed, 22 insertions, 22 deletions
diff --git a/src/jtag/drivers/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c
index 72c756e8..61b42ce5 100644
--- a/src/jtag/drivers/arm-jtag-ew.c
+++ b/src/jtag/drivers/arm-jtag-ew.c
@@ -451,12 +451,12 @@ static int armjtagew_get_status(void)
if (u_tg < 1500)
{
- LOG_ERROR("Vref too low. Check Target Power\n");
+ LOG_ERROR("Vref too low. Check Target Power");
}
}
else
{
- LOG_ERROR("ARM-JTAG-EW command CMD_GET_TAPHW_STATE failed (%d)\n", result);
+ LOG_ERROR("ARM-JTAG-EW command CMD_GET_TAPHW_STATE failed (%d)", result);
}
return ERROR_OK;
@@ -474,7 +474,7 @@ static int armjtagew_get_version_info(void)
if (result != 0)
{
- LOG_ERROR("ARM-JTAG-EW command CMD_GET_VERSION failed (%d)\n", result);
+ LOG_ERROR("ARM-JTAG-EW command CMD_GET_VERSION failed (%d)", result);
return ERROR_JTAG_DEVICE_ERROR;
}
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index c8a98d2d..6449550b 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -2161,7 +2161,7 @@ static int ft2232_init_ftd2xx(uint16_t vid, uint16_t pid, int more, int* try_mor
if (status == FT_OK)
{
- LOG_ERROR("ListDevices: %lu\n", num_devices);
+ LOG_ERROR("ListDevices: %lu", num_devices);
for (i = 0; i < num_devices; i++)
LOG_ERROR("%" PRIu32 ": \"%s\"", i, desc_array[i]);
}
@@ -2173,7 +2173,7 @@ static int ft2232_init_ftd2xx(uint16_t vid, uint16_t pid, int more, int* try_mor
}
else
{
- LOG_ERROR("ListDevices: NONE\n");
+ LOG_ERROR("ListDevices: NONE");
}
return ERROR_JTAG_INIT_FAILED;
}
diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c
index e7e3ced9..4a8896ba 100644
--- a/src/jtag/drivers/jlink.c
+++ b/src/jtag/drivers/jlink.c
@@ -514,7 +514,7 @@ static int jlink_get_status(void)
result = jlink_usb_read(jlink_handle, 8);
if (result != 8)
{
- LOG_ERROR("J-Link command EMU_CMD_GET_STATE failed (%d)\n", result);
+ LOG_ERROR("J-Link command EMU_CMD_GET_STATE failed (%d)", result);
return ERROR_JTAG_DEVICE_ERROR;
}
diff --git a/src/jtag/drivers/rlink.c b/src/jtag/drivers/rlink.c
index a3fad358..27861b3f 100644
--- a/src/jtag/drivers/rlink.c
+++ b/src/jtag/drivers/rlink.c
@@ -348,7 +348,7 @@ dtc_load_from_buffer(
while (length) {
if (length < sizeof(*header)) {
- LOG_ERROR("Malformed DTC image\n");
+ LOG_ERROR("Malformed DTC image");
exit(1);
}
@@ -357,7 +357,7 @@ dtc_load_from_buffer(
length -= sizeof(*header);
if (length < (size_t)header->length + 1) {
- LOG_ERROR("Malformed DTC image\n");
+ LOG_ERROR("Malformed DTC image");
exit(1);
}
@@ -417,7 +417,7 @@ dtc_load_from_buffer(
break;
default:
- LOG_ERROR("Invalid DTC image record type: 0x%02x\n", header->type);
+ LOG_ERROR("Invalid DTC image record type: 0x%02x", header->type);
exit(1);
break;
}
@@ -538,7 +538,7 @@ dtc_run_download(
if (ep2_buffer[0] & 0x01) break;
if (!--i) {
- LOG_ERROR("%s, %d: too many retries waiting for DTC status\n",
+ LOG_ERROR("%s, %d: too many retries waiting for DTC status",
__FILE__, __LINE__
);
return(-ETIMEDOUT);
@@ -556,7 +556,7 @@ dtc_run_download(
);
if (usb_err < (int)sizeof(ep2_buffer)) {
- LOG_ERROR("%s, %d: Read of endpoint 2 returned %d\n",
+ LOG_ERROR("%s, %d: Read of endpoint 2 returned %d",
__FILE__, __LINE__, usb_err
);
return(usb_err);
@@ -691,7 +691,7 @@ dtc_queue_run(void) {
NULL, 0
);
if (usb_err < 0) {
- LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+ LOG_ERROR("dtc_run_download: %s", usb_strerror());
exit(1);
}
} else {
@@ -700,7 +700,7 @@ dtc_queue_run(void) {
reply_buffer, dtc_queue.reply_index
);
if (usb_err < 0) {
- LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+ LOG_ERROR("dtc_run_download: %s", usb_strerror());
exit(1);
} else {
/* process the reply, which empties the reply queue and frees its entries */
@@ -1106,7 +1106,7 @@ rlink_scan(
uint8_t dtc_mask;
if (scan_size < 1) {
- LOG_ERROR("scan_size cannot be less than 1 bit\n");
+ LOG_ERROR("scan_size cannot be less than 1 bit");
exit(1);
}
@@ -1230,7 +1230,7 @@ rlink_scan(
chunk_bits,
cmd
) == NULL) {
- LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
exit(1);
}
@@ -1295,7 +1295,7 @@ rlink_scan(
extra_bits,
cmd
) == NULL) {
- LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
exit(1);
}
@@ -1353,7 +1353,7 @@ rlink_scan(
1,
cmd
) == NULL) {
- LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
exit(1);
}
@@ -1503,7 +1503,7 @@ int rlink_speed(int speed)
for (i = rlink_speed_table_size; i--;) {
if (rlink_speed_table[i].prescaler == speed) {
if (dtc_load_from_buffer(pHDev, rlink_speed_table[i].dtc, rlink_speed_table[i].dtc_size) != 0) {
- LOG_ERROR("An error occurred while trying to load DTC code for speed \"%d\".\n", speed);
+ LOG_ERROR("An error occurred while trying to load DTC code for speed \"%d\".", speed);
exit(1);
}
@@ -1583,12 +1583,12 @@ int rlink_init(void)
struct usb_device *dev = usb_device(pHDev);
if (dev->descriptor.bNumConfigurations > 1)
{
- LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...\n");
+ LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...");
return ERROR_FAIL;
}
if (dev->config->bNumInterfaces > 1)
{
- LOG_ERROR("Whoops! NumInterfaces is not 1, don't know what to do...\n");
+ LOG_ERROR("Whoops! NumInterfaces is not 1, don't know what to do...");
return ERROR_FAIL;
}
@@ -1624,7 +1624,7 @@ int rlink_init(void)
}
if (usb_set_altinterface(pHDev,0) != 0)
{
- LOG_ERROR("Failed to set interface.\n");
+ LOG_ERROR("Failed to set interface.");
return ERROR_FAIL;
}
diff --git a/src/jtag/drivers/usb_blaster.c b/src/jtag/drivers/usb_blaster.c
index c9b88f86..54ad40f0 100644
--- a/src/jtag/drivers/usb_blaster.c
+++ b/src/jtag/drivers/usb_blaster.c
@@ -370,7 +370,7 @@ static int usb_blaster_init(void)
if (status == FT_OK)
{
- LOG_ERROR("ListDevices: %lu\n", num_devices);
+ LOG_ERROR("ListDevices: %lu", num_devices);
for (i = 0; i < num_devices; i++)
LOG_ERROR("%i: %s", i, desc_array[i]);
}