Allow f2fs sparse mode to be disabled

Bug: 142424832
Bug: 142803849
Change-Id: Ic112128f15e3f29208332afceea4fbc3fca40b36
This commit is contained in:
Alistair Delva
2019-10-16 10:53:41 -07:00
parent 371e3c3b6c
commit 91238cce14
2 changed files with 9 additions and 0 deletions

View File

@@ -315,6 +315,8 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
elif fs_type.startswith("f2fs"):
build_command = ["mkf2fsuserimg.sh"]
build_command.extend([out_file, prop_dict["image_size"]])
if "f2fs_sparse_flag" in prop_dict:
build_command.extend([prop_dict["f2fs_sparse_flag"]])
if fs_config:
build_command.extend(["-C", fs_config])
build_command.extend(["-f", in_dir])
@@ -519,6 +521,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
common_props = (
"extfs_sparse_flag",
"squashfs_sparse_flag",
"f2fs_sparse_flag",
"skip_fsck",
"ext_mkuserimg",
"verity",