diff options
author | Andreas Huber <andih@google.com> | 2017-10-03 19:33:19 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-03 19:33:19 +0000 |
commit | 9f7611a54eed82b53bfa6390c118ce3e922a01cb (patch) | |
tree | f3ad8644c98de6e16cd5c691da84183d38d1b5f6 /ext4_utils | |
parent | 44d1a948d8b8522f1390c5007f333d6b1b23db73 (diff) | |
parent | 79a353c0710df4f9d528ca30890c167222533ca8 (diff) | |
download | extras-9f7611a54eed82b53bfa6390c118ce3e922a01cb.tar.gz |
Merge "Fix mac build." am: 5da045dc1a am: 2cefddbce5
am: 79a353c071
Change-Id: I2c94f7d867fb5b9a844cc005353fc561a32ff589
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/ext4_utils.c | 2 | ||||
-rw-r--r-- | ext4_utils/extent.c | 10 | ||||
-rw-r--r-- | ext4_utils/include/ext4_utils/ext4_utils.h | 4 | ||||
-rw-r--r-- | ext4_utils/make_ext4fs.c | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c index 07a92119..86098519 100644 --- a/ext4_utils/ext4_utils.c +++ b/ext4_utils/ext4_utils.c @@ -632,7 +632,7 @@ int read_ext(int fd, int verbose) printf(" Inodes per group: %d\n", info.inodes_per_group); printf(" Inode size: %d\n", info.inode_size); printf(" Label: %s\n", info.label); - printf(" Blocks: %"PRIu64"\n", aux_info.len_blocks); + printf(" Blocks: %"PRIext4u64"\n", aux_info.len_blocks); printf(" Block groups: %d\n", aux_info.groups); printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks); printf(" Used %d/%d inodes and %d/%d blocks\n", diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c index ff56a141..3cdf6605 100644 --- a/ext4_utils/extent.c +++ b/ext4_utils/extent.c @@ -150,7 +150,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 %"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 @@ u8 *inode_allocate_data_extents(struct ext4_inode *inode, u64 len, 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 @@ struct block_allocation* inode_allocate_file_extents(struct ext4_inode *inode, u 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 @@ void inode_allocate_extents(struct ext4_inode *inode, u64 len) 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; } diff --git a/ext4_utils/include/ext4_utils/ext4_utils.h b/ext4_utils/include/ext4_utils/ext4_utils.h index 75c72bbf..17a8056b 100644 --- a/ext4_utils/include/ext4_utils/ext4_utils.h +++ b/ext4_utils/include/ext4_utils/ext4_utils.h @@ -75,9 +75,13 @@ extern int force; #ifdef __LP64__ typedef unsigned long u64; typedef signed long s64; + +#define PRIext4u64 "lu" #else typedef unsigned long long u64; typedef signed long long s64; + +#define PRIext4u64 PRIu64 #endif typedef unsigned int u32; typedef unsigned short int u16; diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index 24ed0f58..cadf55c1 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c @@ -823,7 +823,7 @@ int make_ext4fs_internal(int fd, const char *_directory, const char *_target_out ext4_create_fs_aux_info(); - printf(" Blocks: %"PRIu64"\n", aux_info.len_blocks); + printf(" Blocks: %"PRIext4u64"\n", aux_info.len_blocks); printf(" Block groups: %d\n", aux_info.groups); printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks); |