diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-09-09 00:50:48 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-09-09 20:52:21 -0700 |
commit | 172360ec5dc9b5a620d677a985ece05f4e0301bd (patch) | |
tree | adb647b246a76671c8c8bccc19a1fe8c07fcbb42 | |
parent | 985e90e26320c73949d5dfbf218773f2cb744598 (diff) | |
download | vboot-172360ec5dc9b5a620d677a985ece05f4e0301bd.tar.gz |
Replace %L with %ll in format strings.
%L is, in some standard libraries like U-Boot's, a synonym for %ll which is
for long long integers, required by the C99 standard to be at least 64 bits.
For practical purposes that basically means %ll should be used with 64 bit
values. Since %L seems to be non-standard and, at least in U-Boot's case, %ll
is recognized in the same way, %ll seems preferable.
BUG=chrome-os-partner:8339
TEST=Booted ChromeOS using depthcharge and U-Boot. Booted with
depthcharge/libpayload which does not support %L and saw a number where %L had
been printed.
BRANCH=None
Change-Id: Id51fb5c9295e0dd65b42a5c0738eb34c8210a2b2
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32660
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 2 | ||||
-rw-r--r-- | firmware/lib/vboot_audio.c | 2 | ||||
-rw-r--r-- | tests/vboot_api_kernel_tests.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 7539f21e..3ce59833 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -74,7 +74,7 @@ uint32_t VbTryLoadKernel(VbCommonParams* cparams, LoadKernelParams* p, if (512 != disk_info[i].bytes_per_lba || /* cgptlib restriction */ 32 > disk_info[i].lba_count || /* ditto */ get_info_flags != disk_info[i].flags) { /* got only what we asked for */ - VBDEBUG((" skipping: bytes_per_lba=%Ld lba_count=%Ld flags=0x%x\n", + VBDEBUG((" skipping: bytes_per_lba=%lld lba_count=%lld flags=0x%x\n", disk_info[i].bytes_per_lba, disk_info[i].lba_count, disk_info[i].flags)); continue; diff --git a/firmware/lib/vboot_audio.c b/firmware/lib/vboot_audio.c index f9d28f61..641bae0f 100644 --- a/firmware/lib/vboot_audio.c +++ b/firmware/lib/vboot_audio.c @@ -201,7 +201,7 @@ VbAudioContext* VbAudioOpen(VbCommonParams* cparams) { VbExSleepMs(10); b = VbExGetTimer(); ticks_per_msec = (b - a) / 10ULL ; - VBDEBUG(("VbAudioOpen() - ticks_per_msec is %Lu\n", ticks_per_msec)); + VBDEBUG(("VbAudioOpen() - ticks_per_msec is %llu\n", ticks_per_msec)); /* Initialize */ Memset(audio, 0, sizeof(*audio)); diff --git a/tests/vboot_api_kernel_tests.c b/tests/vboot_api_kernel_tests.c index 792f3281..444cff7c 100644 --- a/tests/vboot_api_kernel_tests.c +++ b/tests/vboot_api_kernel_tests.c @@ -235,7 +235,7 @@ VbError_t VbExDiskGetInfo(VbDiskInfo** infos_ptr, uint32_t* count, mock_disks[num_disks].flags = t->disks_to_provide[i].flags; mock_disks[num_disks].handle = (VbExDiskHandle_t)t->disks_to_provide[i].diskname; - VBDEBUG((" mock_disk[%d] %Ld %Ld 0x%x %s\n", i, + VBDEBUG((" mock_disk[%d] %lld %lld 0x%x %s\n", i, mock_disks[num_disks].bytes_per_lba, mock_disks[num_disks].lba_count, mock_disks[num_disks].flags, @@ -253,7 +253,7 @@ VbError_t VbExDiskGetInfo(VbDiskInfo** infos_ptr, uint32_t* count, else *count = num_disks; - VBDEBUG((" *count=%Ld\n", *count)); + VBDEBUG((" *count=%lld\n", *count)); VBDEBUG((" return 0x%x\n", t->diskgetinfo_return_val)); return t->diskgetinfo_return_val; |