diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-03-15 02:20:02 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-03-15 15:27:02 -0700 |
commit | 464dfebeb9ffe68d37d9966c2415e778637033b1 (patch) | |
tree | 9a244191dc18c3fa48d17e93ea36e4ba447aefd1 | |
parent | 16c9f7e347ed7a4bb5ae155f19451e807521df5e (diff) |
gen: Get disk/part_dos.c to compile when CONFIG_SYS_64BIT_LBA is turned on
The code in this file tries to print an LBA using the format specifier
"%10ld", but when CONFIG_SYS_64BIT_LBA is turned on, the argument passed in
this position is a 64 bit value and isn't compatible. This change selects the
appropriate format specifier, the original or "10lld", based on whether
CONFIG_SYS_64BIT_LBA is turned on.
BUG=chrome-os-partner:8180
TEST=Built for Stumpy with BUILD_PART_FS_STUFF turned on and
CONFIG_SYS_64BIT_LBA enabled and disable, and saw the compile errors go away.
Change-Id: Ib80b1567ce07673aea2b47dfba9b3526b32f9de5
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/18219
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | disk/part_dos.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c index 2de1bb83b7d..f062b10569d 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -119,8 +119,9 @@ static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_s return; } if(i==DOS_PBR) { - printf (" 1\t\t 0\t%10ld\t%2x\n", - dev_desc->lba, buffer[DOS_PBR_MEDIA_TYPE_OFFSET]); + printf (" 1\t\t 0\t%10lld\t%2x\n", + (uint64_t)dev_desc->lba, + buffer[DOS_PBR_MEDIA_TYPE_OFFSET]); return; } /* Print all primary/logical partitions */ |