Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ti-connected-launchpad
lm4tools_public
Commits
99d501b6
Commit
99d501b6
authored
Dec 06, 2012
by
Fabio Utzig
Browse files
Disable serial number for MacOSX
parent
cc466b1e
Changes
1
Show whitespace changes
Inline
Side-by-side
lm4flash/lm4flash.c
View file @
99d501b6
...
...
@@ -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
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment