summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-01-27 13:58:04 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-27 13:58:04 -0800
commite83cd37e58b00fb6b9eb50464067864ca0cb2ff7 (patch)
tree47103d5023e1bbc6e84db3295afdc65bc916527b
parent70580b20bc8485002df0b3e89e42754c8c9796ff (diff)
parent0458d373261d89979529853fa63cdd998b12e04a (diff)
downloadcore-e83cd37e58b00fb6b9eb50464067864ca0cb2ff7.tar.gz
core-e83cd37e58b00fb6b9eb50464067864ca0cb2ff7.tar.bz2
core-e83cd37e58b00fb6b9eb50464067864ca0cb2ff7.zip
am 0458d373: Merge "fastboot: set the language local string"
* commit '0458d373261d89979529853fa63cdd998b12e04a': fastboot: set the language local string
-rw-r--r--fastboot/usb_linux.c5
-rw-r--r--fastboot/usb_osx.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c
index 1ba87e62a..cbc64e4e4 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 570a456ac..6df5d2c97 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);