From c0a8c63935aa0fc741d7bb9d0b759204d358b4d1 Mon Sep 17 00:00:00 2001 From: Tamas Petz Date: Mon, 3 Feb 2020 15:41:02 +0100 Subject: [PATCH] build_image: check value of "ext4_share_dup_blocks" Regardless of the value of "ext4_share_dup_blocks" "-c" flag is passed unconditionally. The correct behavior is to check if "ext4_share_dup_blocks" is set to "true". Test: 1. build bonito with "BOARD_EXT4_SHARE_DUP_BLOCKS := false" 2. check for "shared_blocks" feature of system.img ./out/host/linux-x86/bin/tune2fs -l \ ./out/target/product/bonito/system.img | \ grep -o shared_blocks Change-Id: I8c0e5606658dd0f47b71cfc6c453a77a57da4f42 --- tools/releasetools/build_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index e424b6f9a..ed9183e19 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -287,7 +287,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): build_command.extend(["-U", prop_dict["uuid"]]) if "hash_seed" in prop_dict: build_command.extend(["-S", prop_dict["hash_seed"]]) - if "ext4_share_dup_blocks" in prop_dict: + if prop_dict.get("ext4_share_dup_blocks") == "true": build_command.append("-c") if (needs_projid): build_command.extend(["--inode_size", "512"])