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( ...@@ -575,10 +575,14 @@ flasher_find_matching_device(
const char *serial) const char *serial)
{ {
struct libusb_device_descriptor device_descriptor; struct libusb_device_descriptor device_descriptor;
#ifndef __APPLE__
char descriptor_buffer[256]; char descriptor_buffer[256];
#endif
libusb_device **device_list = NULL; libusb_device **device_list = NULL;
libusb_device *matching_device = NULL; libusb_device *matching_device = NULL;
#ifndef __APPLE__
libusb_device_handle *handle; libusb_device_handle *handle;
#endif
enum flasher_error flasher_error; enum flasher_error flasher_error;
enum libusb_error libusb_error; enum libusb_error libusb_error;
...@@ -619,6 +623,8 @@ flasher_find_matching_device( ...@@ -619,6 +623,8 @@ flasher_find_matching_device(
device_descriptor.idProduct != product_id) { device_descriptor.idProduct != product_id) {
continue; continue;
} }
#ifndef __APPLE__
/* Open each device so that we can read the serial number */ /* Open each device so that we can read the serial number */
retval = libusb_open(device_list[device_index], &handle); retval = libusb_open(device_list[device_index], &handle);
if (retval < 0) { if (retval < 0) {
...@@ -641,6 +647,7 @@ flasher_find_matching_device( ...@@ -641,6 +647,7 @@ flasher_find_matching_device(
/* Skip devices with serial that does not match */ /* Skip devices with serial that does not match */
if (serial != NULL && strcmp(serial, descriptor_buffer) != 0) if (serial != NULL && strcmp(serial, descriptor_buffer) != 0)
continue; continue;
#endif
if (matching_device == NULL) { if (matching_device == NULL) {
flasher_error = FLASHER_SUCCESS; flasher_error = FLASHER_SUCCESS;
matching_device = device_list[device_index]; matching_device = device_list[device_index];
......
Supports Markdown
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