diff options
author | Colin Cross <ccross@android.com> | 2014-01-23 13:19:27 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-01-29 19:47:05 -0800 |
commit | af0723439af552c170425416ee8e35f4f20bbe67 (patch) | |
tree | bbce41eca757f15e2058d53e014890f06c0c1341 /ext4_utils/extent.c | |
parent | 9a2b60b28d866b94b86c7ceb3a9004d28e20b483 (diff) | |
download | extras-af0723439af552c170425416ee8e35f4f20bbe67.tar.gz |
ext4_utils: fix build for 64 bit
Correct u64/s64 definitions
Use PRIu64 to print u64
Change-Id: Icaf7998946b0a2faa03495b404af8b94e4e3d047
Diffstat (limited to 'ext4_utils/extent.c')
-rw-r--r-- | ext4_utils/extent.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c index aeff0f6b..abb30ce4 100644 --- a/ext4_utils/extent.c +++ b/ext4_utils/extent.c @@ -19,6 +19,7 @@ #include <sparse/sparse.h> +#include <inttypes.h> #include <stdlib.h> #include <stdio.h> @@ -128,7 +129,7 @@ static struct block_allocation *do_inode_allocate_extents( if (((int)(info.block_size - sizeof(struct ext4_extent_header) / sizeof(struct ext4_extent))) < allocation_len) { - error("File size %llu is too big to fit in a single extent block\n", + error("File size %"PRIu64" is too big to fit in a single extent block\n", len); return NULL; } @@ -184,14 +185,14 @@ u8 *inode_allocate_data_extents(struct ext4_inode *inode, u64 len, alloc = do_inode_allocate_extents(inode, len); if (alloc == NULL) { - error("failed to allocate extents for %llu bytes", len); + error("failed to allocate extents for %"PRIu64" bytes", len); return NULL; } if (backing_len) { data = extent_create_backing(alloc, backing_len); if (!data) - error("failed to create backing for %llu bytes", backing_len); + error("failed to create backing for %"PRIu64" bytes", backing_len); } free_alloc(alloc); @@ -208,7 +209,7 @@ void inode_allocate_file_extents(struct ext4_inode *inode, u64 len, alloc = do_inode_allocate_extents(inode, len); if (alloc == NULL) { - error("failed to allocate extents for %llu bytes", len); + error("failed to allocate extents for %"PRIu64" bytes", len); return; } @@ -224,7 +225,7 @@ void inode_allocate_extents(struct ext4_inode *inode, u64 len) alloc = do_inode_allocate_extents(inode, len); if (alloc == NULL) { - error("failed to allocate extents for %llu bytes", len); + error("failed to allocate extents for %"PRIu64" bytes", len); return; } |