Commit aac618a32b89a3b753625cfa87aab815efd6f601

Authored by Simon Glass
Committed by Tom Rini
1 parent 4166ecb247

ext4: Use inttypes for printf() string

On 64-bit platforms (like sandbox) 64-bit integers may be 'long' rather
than 'long long'. Use the inttypes header to avoid compiler warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

fs/ext4/ext4_common.c
... ... @@ -22,6 +22,7 @@
22 22 #include <common.h>
23 23 #include <ext_common.h>
24 24 #include <ext4fs.h>
  25 +#include <inttypes.h>
25 26 #include <malloc.h>
26 27 #include <stddef.h>
27 28 #include <linux/stat.h>
... ... @@ -73,7 +74,7 @@
73 74 if ((startblock + (size >> log2blksz)) >
74 75 (part_offset + fs->total_sect)) {
75 76 printf("part_offset is " LBAFU "\n", part_offset);
76   - printf("total_sector is %llu\n", fs->total_sect);
  77 + printf("total_sector is %" PRIu64 "\n", fs->total_sect);
77 78 printf("error: overflow occurs\n");
78 79 return;
79 80 }