浏览代码

usb: gadget: fastboot: explicitly set radix of maximum download size

The processing of the max-download-size variable requires a
radix specifier, or the fastboot host tool will interpret
it as an octal number.

See function get_target_sparse_limit() in file fastboot/fastboot.c
in the AOSP:
        https://android.googlesource.com/platform/system/core/+/master

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Eric Nelson 10 年之前
父节点
当前提交
84c24f66c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/gadget/f_fastboot.c

+ 1 - 1
drivers/usb/gadget/f_fastboot.c

@@ -355,7 +355,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
 		!strcmp_l1("max-download-size", cmd)) {
 		char str_num[12];
 
-		sprintf(str_num, "%08x", CONFIG_USB_FASTBOOT_BUF_SIZE);
+		sprintf(str_num, "0x%08x", CONFIG_USB_FASTBOOT_BUF_SIZE);
 		strncat(response, str_num, chars_left);
 	} else if (!strcmp_l1("serialno", cmd)) {
 		s = getenv("serial#");