Support -blank_data_image_fmt="ext4". am: d77ae137c6
Change-Id: If961d6fece5fb763c7ec0f42743da5ccc8550cef
diff --git a/host/commands/assemble_cvd/data_image.cc b/host/commands/assemble_cvd/data_image.cc
index e184cb8..9b0ca12 100644
--- a/host/commands/assemble_cvd/data_image.cc
+++ b/host/commands/assemble_cvd/data_image.cc
@@ -73,7 +73,9 @@
count += std::to_string(block_count);
std::string bs = "bs=" + block_size;
cvd::execute({"/bin/dd", "if=/dev/zero", of, bs, count});
- if (image_fmt != "none") {
+ if (image_fmt == "ext4") {
+ cvd::execute({"/sbin/mkfs.ext4", image});
+ } else if (image_fmt != "none") {
auto make_f2fs_path = vsoc::DefaultHostArtifactsPath("bin/make_f2fs");
cvd::execute({make_f2fs_path, "-t", image_fmt, image, "-g", "android"});
}