diff options
author | Ji Luo <ji.luo@nxp.com> | 2018-11-02 09:08:13 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2018-11-02 20:50:10 -0500 |
commit | 21a49ca83bcbda2832c1e379b935f0dfc964ba42 (patch) | |
tree | 6bbedc118d02dd01d47afea04b9a411293ac5a55 /drivers | |
parent | 0137aff2a7ea9b2a668b4dbf4e80a75f354052cc (diff) |
MA-13295 Fix userdata partition size overflow on imx6/7 platforms
Type "ulong" will be 32 bits long on imx6/7 but we may have
userdate partition more than 4G on 32 bits platforms. Use
"uint64_t" instead of "ulong" here to fix this issue.
Test: Get correct userdata partition size on both imx6dl
and imx8qxp.
Change-Id: Ia6b242f3998a65b157737e83da0ad3126b689713
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 31445d6b14..ace0ed4b57 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -2968,8 +2968,8 @@ static int get_single_var(char *cmd, char *response) return -1; } else { snprintf(response + strlen(response), chars_left, - "0x%lx", - (ulong)fb_part->length * get_block_size()); + "0x%llx", + (uint64_t)fb_part->length * get_block_size()); } } else if ((str = strstr(cmd, "partition-type:"))) { str +=strlen("partition-type:"); |