Merge "When checking if mke2fs is used, compare using basename"

This commit is contained in:
Tianjie Xu 2021-05-18 02:10:02 +00:00 committed by Gerrit Code Review
commit 77e0d86f26

View file

@ -283,7 +283,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
if "flash_logical_block_size" in prop_dict: if "flash_logical_block_size" in prop_dict:
build_command.extend(["-o", prop_dict["flash_logical_block_size"]]) build_command.extend(["-o", prop_dict["flash_logical_block_size"]])
# Specify UUID and hash_seed if using mke2fs. # Specify UUID and hash_seed if using mke2fs.
if prop_dict["ext_mkuserimg"] == "mkuserimg_mke2fs": if os.path.basename(prop_dict["ext_mkuserimg"]) == "mkuserimg_mke2fs":
if "uuid" in prop_dict: if "uuid" in prop_dict:
build_command.extend(["-U", prop_dict["uuid"]]) build_command.extend(["-U", prop_dict["uuid"]])
if "hash_seed" in prop_dict: if "hash_seed" in prop_dict: