diff options
author | Matt Reimer <mreimer@sdgsystems.com> | 2014-09-04 16:09:49 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2015-08-19 14:46:17 -0700 |
commit | 81c24f6f869a19466052b29c501fd9cf8372b0b2 (patch) | |
tree | ca586ab6ded4fde8552f528af307b9c125111914 | |
parent | e656be3313fa30adf9be149584d2005a7824f763 (diff) | |
download | system_core-81c24f6f869a19466052b29c501fd9cf8372b0b2.tar.gz system_core-81c24f6f869a19466052b29c501fd9cf8372b0b2.tar.bz2 system_core-81c24f6f869a19466052b29c501fd9cf8372b0b2.zip |
Get fastboot working on OS X
Get fastboot working on OS X by calling USBDeviceOpen() before
calling SetConfiguration().
Change-Id: I5034721d5f33ef18273153ff40eb940baa8261cd
-rw-r--r-- | fastboot/usb_osx.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fastboot/usb_osx.cpp b/fastboot/usb_osx.cpp index 7ae2aa5f5..45ae833e5 100644 --- a/fastboot/usb_osx.cpp +++ b/fastboot/usb_osx.cpp @@ -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); } |