Get fastboot working on OS X
Get fastboot working on OS X by calling USBDeviceOpen() before calling SetConfiguration(). Change-Id: I5034721d5f33ef18273153ff40eb940baa8261cd
This commit is contained in:
parent
e656be3313
commit
81c24f6f86
1 changed files with 11 additions and 0 deletions
|
|
@ -293,6 +293,13 @@ static int try_device(io_service_t device, usb_handle *handle) {
|
|||
|
||||
// So, we have a device, finally. Grab its vitals.
|
||||
|
||||
|
||||
kr = (*dev)->USBDeviceOpen(dev);
|
||||
if (kr != 0) {
|
||||
WARN("USBDeviceOpen");
|
||||
goto out;
|
||||
}
|
||||
|
||||
kr = (*dev)->GetDeviceVendor(dev, &handle->info.dev_vendor);
|
||||
if (kr != 0) {
|
||||
ERR("GetDeviceVendor");
|
||||
|
|
@ -365,12 +372,16 @@ static int try_device(io_service_t device, usb_handle *handle) {
|
|||
goto error;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
(*dev)->USBDeviceClose(dev);
|
||||
(*dev)->Release(dev);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
||||
if (dev != NULL) {
|
||||
(*dev)->USBDeviceClose(dev);
|
||||
(*dev)->Release(dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue