diff options
author | Matthias Bolte <matthias.bolte@googlemail.com> | 2013-10-14 19:05:12 +0200 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2014-01-07 21:15:16 +0000 |
commit | 0500232303fe706dbe538290a49869f1dadf90af (patch) | |
tree | 68d1a77d1fe48bb74af01c7450e392af822a3f70 | |
parent | 314f4ff998f6ba63607ce3be6cd7193a39cd1f78 (diff) | |
download | libusb-0500232303fe706dbe538290a49869f1dadf90af.tar.gz |
Darwin: Fix format of 64-bit sessionIDs in log messages
* The sessionID value is 64-bit, so print it as such.
* Closes #153
-rw-r--r-- | libusb/os/darwin_usb.c | 8 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index 146218b..35385d5 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -750,7 +750,7 @@ static int darwin_get_cached_device(struct libusb_context *ctx, io_service_t ser (void) get_ioregistry_value_number (service, CFSTR("sessionID"), kCFNumberSInt64Type, &sessionID); (void) get_ioregistry_value_number (service, CFSTR("PortNum"), kCFNumberSInt8Type, &port); - usbi_dbg("finding cached device for sessionID 0x\n" PRIx64, sessionID); + usbi_dbg("finding cached device for sessionID 0x%" PRIx64, sessionID); result = IORegistryEntryGetParentEntry (service, kIOUSBPlane, &parent); @@ -764,7 +764,7 @@ static int darwin_get_cached_device(struct libusb_context *ctx, io_service_t ser *cached_out = NULL; list_for_each_entry(new_device, &darwin_cached_devices, list, struct darwin_cached_device) { - usbi_dbg("matching sessionID 0x%x against cached device with sessionID 0x%x", sessionID, new_device->session); + usbi_dbg("matching sessionID 0x%" PRIx64 " against cached device with sessionID 0x%" PRIx64, sessionID, new_device->session); if (new_device->session == sessionID) { usbi_dbg("using cached device for device"); *cached_out = new_device; @@ -775,7 +775,7 @@ static int darwin_get_cached_device(struct libusb_context *ctx, io_service_t ser if (*cached_out) break; - usbi_dbg("caching new device with sessionID 0x%x\n", sessionID); + usbi_dbg("caching new device with sessionID 0x%" PRIx64, sessionID); device = darwin_device_from_service (service); if (!device) { @@ -845,7 +845,7 @@ static int process_new_device (struct libusb_context *ctx, io_service_t service) if (ret) break; - usbi_dbg ("allocating new device in context %p for with session 0x%08x", + usbi_dbg ("allocating new device in context %p for with session 0x%" PRIx64, ctx, cached_device->session); dev = usbi_alloc_device(ctx, (unsigned long) cached_device->session); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 6d6aaaa..4dc856c 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10859 +#define LIBUSB_NANO 10860 |