Commit 99d501b6 authored by Fabio Utzig's avatar Fabio Utzig
Browse files

Disable serial number for MacOSX

parent cc466b1e
......@@ -575,10 +575,14 @@ flasher_find_matching_device(
const char *serial)
{
struct libusb_device_descriptor device_descriptor;
#ifndef __APPLE__
char descriptor_buffer[256];
#endif
libusb_device **device_list = NULL;
libusb_device *matching_device = NULL;
#ifndef __APPLE__
libusb_device_handle *handle;
#endif
enum flasher_error flasher_error;
enum libusb_error libusb_error;
......@@ -619,6 +623,8 @@ flasher_find_matching_device(
device_descriptor.idProduct != product_id) {
continue;
}
#ifndef __APPLE__
/* Open each device so that we can read the serial number */
retval = libusb_open(device_list[device_index], &handle);
if (retval < 0) {
......@@ -641,6 +647,7 @@ flasher_find_matching_device(
/* Skip devices with serial that does not match */
if (serial != NULL && strcmp(serial, descriptor_buffer) != 0)
continue;
#endif
if (matching_device == NULL) {
flasher_error = FLASHER_SUCCESS;
matching_device = device_list[device_index];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment