while (length) {
if (length < sizeof(*header)) {
- LOG_ERROR("Malformed DTC image\n");
+ LOG_ERROR("Malformed DTC image");
exit(1);
}
length -= sizeof(*header);
if (length < (size_t)header->length + 1) {
- LOG_ERROR("Malformed DTC image\n");
+ LOG_ERROR("Malformed DTC image");
exit(1);
}
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;
}
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);
);
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);
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 {
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 */
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);
}
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);
}
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);
}
1,
cmd
) == NULL) {
- LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
exit(1);
}
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);
}
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;
}
}
if (usb_set_altinterface(pHDev,0) != 0)
{
- LOG_ERROR("Failed to set interface.\n");
+ LOG_ERROR("Failed to set interface.");
return ERROR_FAIL;
}