ext4_utils: fix build for 64 bit
Correct u64/s64 definitions
Use PRIu64 to print u64
Change-Id: Icaf7998946b0a2faa03495b404af8b94e4e3d047
diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c
index aeff0f6..abb30ce 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 @@
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 @@
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 @@
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 @@
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;
}