Fix mac build.
"u64" is either an unsigned long (in __LP64__ builds) or
an unsigned long long (otherwise). This CL adds a format string
"PRIext4u64" to be used in place of "PRIu64" when referring to a
variable of type "u64".
related-to-build
Test: make
Change-Id: I6ef911dda3ebdcc0f895c54325b8a82b57a62ee6
diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c
index ff56a14..3cdf660 100644
--- a/ext4_utils/extent.c
+++ b/ext4_utils/extent.c
@@ -150,7 +150,7 @@
if (((int)(info.block_size - sizeof(struct ext4_extent_header) /
sizeof(struct ext4_extent))) < allocation_len) {
- error("File size %"PRIu64" is too big to fit in a single extent block\n",
+ error("File size %"PRIext4u64" is too big to fit in a single extent block\n",
len);
return NULL;
}
@@ -206,14 +206,14 @@
alloc = do_inode_allocate_extents(inode, len, NULL);
if (alloc == NULL) {
- error("failed to allocate extents for %"PRIu64" bytes", len);
+ error("failed to allocate extents for %"PRIext4u64" bytes", len);
return NULL;
}
if (backing_len) {
data = extent_create_backing(alloc, backing_len);
if (!data)
- error("failed to create backing for %"PRIu64" bytes", backing_len);
+ error("failed to create backing for %"PRIext4u64" bytes", backing_len);
}
free_alloc(alloc);
@@ -247,7 +247,7 @@
alloc = do_inode_allocate_extents(inode, len, prealloc);
if (alloc == NULL) {
- error("failed to allocate extents for %"PRIu64" bytes", len);
+ error("failed to allocate extents for %"PRIext4u64" bytes", len);
return NULL;
}
@@ -262,7 +262,7 @@
alloc = do_inode_allocate_extents(inode, len, NULL);
if (alloc == NULL) {
- error("failed to allocate extents for %"PRIu64" bytes", len);
+ error("failed to allocate extents for %"PRIext4u64" bytes", len);
return;
}