diff options
author | Scott Anderson <saa@android.com> | 2012-04-06 12:39:30 -0700 |
---|---|---|
committer | Scott Anderson <saa@android.com> | 2012-04-19 11:59:09 -0700 |
commit | 13081c6915220db03886b177f1a8e0b2c63467c9 (patch) | |
tree | a57de4a1fef7b3124971dabe4ddc44deff6c9bdc /fastboot/usb_windows.c | |
parent | 5383476727659544875b90d49a5371886a31c1fe (diff) | |
download | core-13081c6915220db03886b177f1a8e0b2c63467c9.tar.gz core-13081c6915220db03886b177f1a8e0b2c63467c9.tar.bz2 core-13081c6915220db03886b177f1a8e0b2c63467c9.zip |
fastboot: Add ability to specify device path
For manufacturing and testing, there is a need to talk to
whatever device is connected to a given port on the host. This
change modifies fastboot's "-s" option to take either a serial
number or a device path. The device paths of the connected
devices can be listed using "fastboot -l devices" whose output
will resemble:
016B75D60A00600D usb:2-5 fastboot
AD3C12020173 usb:1-4.3 fastboot
The second column lists the device paths. If the -l option is
not given, the output from "fastboot devices" will be the same as
it used to be (i.e. the paths will not be printed).
Finally, note that the format of the device paths are platform
dependent. The example above is from Linux. On OS-X, the paths
will be "usb:" followed by hex digits. For Windows, the device
paths will be printed as "????????????" and the -s option will
not be able to select a device until someone implements the
underlying functionality in usb_windows.c.
Change-Id: I1f01b8f47acd32edb0ac18db107316a2c923bbde
Signed-off-by: Scott Anderson <saa@android.com>
Diffstat (limited to 'fastboot/usb_windows.c')
-rw-r--r-- | fastboot/usb_windows.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fastboot/usb_windows.c b/fastboot/usb_windows.c index 1050293d7..10317bf1f 100644 --- a/fastboot/usb_windows.c +++ b/fastboot/usb_windows.c @@ -311,6 +311,8 @@ int recognized_device(usb_handle* handle, ifc_match_func callback) { info.serial_number[0] = 0; } + info.device_path[0] = 0; + if (callback(&info) == 0) { return 1; } |