summaryrefslogtreecommitdiff
path: root/ext4_utils
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2018-06-26 12:49:20 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-06-26 12:49:20 -0700
commit1368ff6604389754936c7d65ce576235e45baa1c (patch)
treef24e85b103add1819c6c0b10d99ea8304503ac89 /ext4_utils
parent2c9fd09ca93903e3d425361c0238f73f96637653 (diff)
parent39e0ab1477e721dde9ab67c7b4ecb617d5224d0e (diff)
downloadextras-1368ff6604389754936c7d65ce576235e45baa1c.tar.gz
Merge "ext4_utils: Fix FS creation for filesystems with exactly 32768 blocks."
am: 39e0ab1477 Change-Id: I8060a1cf1e2b3424f2f703cd07484a6f086ce694
Diffstat (limited to 'ext4_utils')
-rw-r--r--ext4_utils/ext4_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c
index cbfd350f..7be28537 100644
--- a/ext4_utils/ext4_utils.c
+++ b/ext4_utils/ext4_utils.c
@@ -123,7 +123,8 @@ void ext4_create_fs_aux_info()
aux_info.default_i_flags = EXT4_NOATIME_FL;
- u32 last_group_size = aux_info.len_blocks % info.blocks_per_group;
+ u32 last_group_size = aux_info.len_blocks == info.blocks_per_group
+ ? aux_info.len_blocks : aux_info.len_blocks % info.blocks_per_group;
u32 last_header_size = 2 + aux_info.inode_table_blocks;
if (ext4_bg_has_super_block((int)aux_info.groups - 1))
last_header_size += 1 + aux_info.bg_desc_blocks +