usbi_gettimeofday(&now, NULL);
if ((global_debug) && (!has_debug_header_been_displayed)) {
has_debug_header_been_displayed = 1;
- usbi_log_str(ctx, LIBUSB_LOG_LEVEL_DEBUG, "[timestamp] [threadID] facility level [function call] <message>\n");
- usbi_log_str(ctx, LIBUSB_LOG_LEVEL_DEBUG, "--------------------------------------------------------------------------------\n");
+ usbi_log_str(ctx, LIBUSB_LOG_LEVEL_DEBUG, "[timestamp] [threadID] facility level [function call] <message>" USBI_LOG_LINE_END);
+ usbi_log_str(ctx, LIBUSB_LOG_LEVEL_DEBUG, "--------------------------------------------------------------------------------" USBI_LOG_LINE_END);
}
if (now.tv_usec < timestamp_origin.tv_usec) {
now.tv_sec--;
(header.bDescriptorType == LIBUSB_DT_DEVICE))
break;
- usbi_dbg("skipping descriptor 0x%x\n", header.bDescriptorType);
+ usbi_dbg("skipping descriptor 0x%x", header.bDescriptorType);
buffer += header.bLength;
size -= header.bLength;
}
else if (r == -1 && errno == EINTR)
return LIBUSB_ERROR_INTERRUPTED;
else if (r < 0) {
- usbi_err(ctx, "poll failed %d err=%d\n", r, errno);
+ usbi_err(ctx, "poll failed %d err=%d", r, errno);
return LIBUSB_ERROR_IO;
}
&score);
if (kIOReturnSuccess != result || !plugInInterface) {
- usbi_dbg ("could not set up plugin for service: %s\n", darwin_error_str (result));
+ usbi_dbg ("could not set up plugin for service: %s", darwin_error_str (result));
return NULL;
}
if (dpriv->open_count == 0) {
/* something is probably very wrong if this is the case */
- usbi_err (HANDLE_CTX (dev_handle), "Close called on a device that was not open!\n");
+ usbi_err (HANDLE_CTX (dev_handle), "Close called on a device that was not open!");
return;
}
if (errno == ENOENT) {
if (!silent)
- usbi_err(ctx, "File doesn't exist, wait %d ms and try again\n", delay/1000);
+ usbi_err(ctx, "File doesn't exist, wait %d ms and try again", delay/1000);
/* Wait 10ms for USB device path creation.*/
usleep(delay);
}
if (!hpriv || hpriv->fd != pollfd->fd) {
- usbi_err(ctx, "cannot find handle for fd %d\n",
+ usbi_err(ctx, "cannot find handle for fd %d",
pollfd->fd);
continue;
}
wfd.cancel_fn = cancel_fn;
if ((access_mode != RW_READ) && (access_mode != RW_WRITE)) {
- usbi_warn(NULL, "only one of RW_READ or RW_WRITE are supported.\n"
+ usbi_warn(NULL, "only one of RW_READ or RW_WRITE are supported. "
"If you want to poll for R/W simultaneously, create multiple fds from the same handle.");
return INVALID_WINFD;
}
//#define ENUM_DEBUG
#ifdef ENUM_DEBUG
const char *passname[] = { "HCD", "HUB", "GEN", "DEV", "HID", "EXT" };
- usbi_dbg("\n#### PROCESSING %ss %s", passname[(pass<=HID_PASS)?pass:HID_PASS+1],
+ usbi_dbg("#### PROCESSING %ss %s", passname[(pass<=HID_PASS)?pass:HID_PASS+1],
(pass!=GEN_PASS)?guid_to_string(guid[pass]):"");
#endif
for (i = 0; ; i++) {
if (h == NULL) {
h = LoadLibraryA("WinUSB");
} if (h == NULL) {
- usbi_warn(ctx, "WinUSB DLL is not available either,\n"
+ usbi_warn(ctx, "WinUSB DLL is not available either, "
"you will not be able to access devices outside of enumeration");
return LIBUSB_ERROR_NOT_FOUND;
}
-#define LIBUSB_NANO 10977
+#define LIBUSB_NANO 10978