diff options
author | ji.luo <ji.luo@nxp.com> | 2017-09-29 13:15:50 +0800 |
---|---|---|
committer | ji.luo <ji.luo@nxp.com> | 2017-11-22 10:35:48 +0800 |
commit | 20b054b4252e1c8835fe9cf7afe0ad87b6d4935d (patch) | |
tree | 508a21e8f31d4552be6bb97f5db8c90a2ed2e0c3 | |
parent | 6b9a7d6a1d24b5cc9c90d16d507abde2633bbf6a (diff) |
Remove leading zeroes of some getvar variables
Remove the leading zeroes of 'partition-size', 'max-download-size',
'erase-block-size' and 'logical-block-size' variables.
Change-Id: I981cfced2d82a43e87a8f244caf04c6920bff5b2
Signed-off-by: ji.luo <ji.luo@nxp.com>
-rwxr-xr-x | drivers/usb/gadget/f_fastboot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 2a3ab6e5d6..592968487b 100755 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -2172,7 +2172,7 @@ static int get_single_var(char *cmd, char *response) strncat(response, "Wrong partition name.", chars_left); return -1; } else { - snprintf(response + strlen(response), chars_left, "0x%016x", fb_part->length * get_block_size()); + snprintf(response + strlen(response), chars_left, "0x%x", fb_part->length * get_block_size()); } } else if ((str = strstr(cmd, "partition-type:"))) { str +=strlen("partition-type:"); @@ -2202,15 +2202,15 @@ static int get_single_var(char *cmd, char *response) } else if (!strcmp_l1("downloadsize", cmd) || !strcmp_l1("max-download-size", cmd)) { - snprintf(response + strlen(response), chars_left, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE); + snprintf(response + strlen(response), chars_left, "0x%x", CONFIG_FASTBOOT_BUF_SIZE); } else if (!strcmp_l1("erase-block-size", cmd)) { mmc_no = fastboot_devinfo.dev_id; dev_desc = blk_get_dev("mmc", mmc_no); - snprintf(response + strlen(response), chars_left, "0x%08x", (unsigned int)dev_desc->blksz); + snprintf(response + strlen(response), chars_left, "0x%x", (unsigned int)dev_desc->blksz); } else if (!strcmp_l1("logical-block-size", cmd)) { mmc_no = fastboot_devinfo.dev_id; dev_desc = blk_get_dev("mmc", mmc_no); - snprintf(response + strlen(response), chars_left, "0x%08x", (unsigned int)dev_desc->blksz); + snprintf(response + strlen(response), chars_left, "0x%x", (unsigned int)dev_desc->blksz); } else if (!strcmp_l1("serialno", cmd)) { s = get_serial(); if (s) |