summaryrefslogtreecommitdiffstats
path: root/fastboot/usb_osx.c
diff options
context:
space:
mode:
authorScott Anderson <saa@android.com>2012-05-01 18:34:22 -0700
committerScott Anderson <saa@android.com>2012-05-01 18:34:22 -0700
commita61bcad58ba1f7359183a333ee58303ed67e4a2f (patch)
treec30d316882119d9acbc9fa9adaf3c0fce11d219b /fastboot/usb_osx.c
parent048f24600f389bb756cf9c6ea93774f31fd588ad (diff)
parent13081c6915220db03886b177f1a8e0b2c63467c9 (diff)
downloadsystem_core-a61bcad58ba1f7359183a333ee58303ed67e4a2f.zip
system_core-a61bcad58ba1f7359183a333ee58303ed67e4a2f.tar.gz
system_core-a61bcad58ba1f7359183a333ee58303ed67e4a2f.tar.bz2
resolved conflicts for merge of 13081c69 to master
Change-Id: I631e466fc53e9b0f4a39f24f959b4ae9b626bdda
Diffstat (limited to 'fastboot/usb_osx.c')
-rw-r--r--fastboot/usb_osx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fastboot/usb_osx.c b/fastboot/usb_osx.c
index cbce9bd..1548ba8 100644
--- a/fastboot/usb_osx.c
+++ b/fastboot/usb_osx.c
@@ -264,6 +264,7 @@ static int try_device(io_service_t device, usb_handle *handle) {
SInt32 score;
HRESULT result;
UInt8 serialIndex;
+ UInt32 locationId;
// Create an intermediate plugin.
kr = IOCreatePlugInInterfaceForService(device,
@@ -322,6 +323,13 @@ static int try_device(io_service_t device, usb_handle *handle) {
goto error;
}
+ kr = (*dev)->GetLocationID(dev, &locationId);
+ if (kr != 0) {
+ ERR("GetLocationId");
+ goto error;
+ }
+ snprintf(handle->info.device_path, sizeof(handle->info.device_path), "usb:%lX", locationId);
+
kr = (*dev)->USBGetSerialNumberStringIndex(dev, &serialIndex);
if (serialIndex > 0) {