diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2012-01-27 21:09:21 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-01-27 21:09:21 -0800 |
| commit | 0fe24c96be69e0fd03cbaf16f1b0070423d98799 (patch) | |
| tree | 18d2f72922c501472648310c65a868f55e0e2418 | |
| parent | 46f86f11d446a650602057f8a07eba1f609d7fe9 (diff) | |
| parent | 142e895a1d5030a4e032f08fa5814ebd42b964b6 (diff) | |
| download | system_core-0fe24c96be69e0fd03cbaf16f1b0070423d98799.zip system_core-0fe24c96be69e0fd03cbaf16f1b0070423d98799.tar.gz system_core-0fe24c96be69e0fd03cbaf16f1b0070423d98799.tar.bz2 | |
am 142e895a: am e83cd37e: am 0458d373: Merge "fastboot: set the language local string"
* commit '142e895a1d5030a4e032f08fa5814ebd42b964b6':
fastboot: set the language local string
| -rw-r--r-- | fastboot/usb_linux.c | 5 | ||||
| -rw-r--r-- | fastboot/usb_osx.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c index 1ba87e6..cbc64e4 100644 --- a/fastboot/usb_linux.c +++ b/fastboot/usb_linux.c @@ -139,10 +139,11 @@ static int filter_usb_device(int fd, char *ptr, int len, int writable, ctrl.bRequestType = USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE; ctrl.bRequest = USB_REQ_GET_DESCRIPTOR; ctrl.wValue = (USB_DT_STRING << 8) | dev->iSerialNumber; - ctrl.wIndex = 0; + //language ID (en-us) for serial number string + ctrl.wIndex = 0x0409; ctrl.wLength = sizeof(buffer); ctrl.data = buffer; - ctrl.timeout = 50; + ctrl.timeout = 50; result = ioctl(fd, USBDEVFS_CONTROL, &ctrl); if (result > 0) { diff --git a/fastboot/usb_osx.c b/fastboot/usb_osx.c index 570a456..6df5d2c 100644 --- a/fastboot/usb_osx.c +++ b/fastboot/usb_osx.c @@ -331,7 +331,8 @@ static int try_device(io_service_t device, usb_handle *handle) { req.bmRequestType = USBmakebmRequestType(kUSBIn, kUSBStandard, kUSBDevice); req.bRequest = kUSBRqGetDescriptor; req.wValue = (kUSBStringDesc << 8) | serialIndex; - req.wIndex = 0; + //language ID (en-us) for serial number string + req.wIndex = 0x0409; req.pData = buffer; req.wLength = sizeof(buffer); kr = (*dev)->DeviceRequest(dev, &req); |
