summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-14 09:27:34 +0100
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-14 09:27:34 +0100
commit89de5755aa8c900ad049646d2e6488fd35874474 (patch)
tree2fa928a931828b7ffdfb56056402edd731a39cc4
parentSnap for 4447680 from d70f5d924b915b1c7e93c01af6dbe8d30b3b8cc3 to pi-release (diff)
parentMerge "recovery: format f2fs with encrypt/quota" am: d4b6e25fdd am: c418bfeae2 (diff)
downloadandroid_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar.gz
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar.bz2
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar.lz
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar.xz
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.tar.zst
android_bootable_recovery-89de5755aa8c900ad049646d2e6488fd35874474.zip
-rw-r--r--roots.cpp4
-rw-r--r--updater/install.cpp14
2 files changed, 13 insertions, 5 deletions
diff --git a/roots.cpp b/roots.cpp
index c0348d715..3cc7b4188 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -321,7 +321,9 @@ int format_volume(const char* volume, const char* directory) {
}
// Has to be f2fs because we checked earlier.
- std::vector<std::string> f2fs_args = { "/sbin/mkfs.f2fs", "-t", "-d1", v->blk_device };
+ std::vector<std::string> f2fs_args = { "/sbin/mkfs.f2fs", "-d1", "-f",
+ "-O", "encrypt", "-O", "quota",
+ v->blk_device };
if (length >= 512) {
f2fs_args.push_back(std::to_string(length / 512));
}
diff --git a/updater/install.cpp b/updater/install.cpp
index b865081b4..a111f4b79 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -303,10 +303,16 @@ Value* FormatFn(const char* name, State* state, const std::vector<std::unique_pt
std::string num_sectors = std::to_string(size / 512);
const char* f2fs_path = "/sbin/mkfs.f2fs";
- const char* f2fs_argv[] = {
- "mkfs.f2fs", "-t", "-d1", location.c_str(), (size < 512) ? nullptr : num_sectors.c_str(),
- nullptr
- };
+ const char* f2fs_argv[] = { "mkfs.f2fs",
+ "-d1",
+ "-f",
+ "-O",
+ "encrypt",
+ "-O",
+ "quota",
+ location.c_str(),
+ (size < 512) ? nullptr : num_sectors.c_str(),
+ nullptr };
int status = exec_cmd(f2fs_path, const_cast<char**>(f2fs_argv));
if (status != 0) {
LOG(ERROR) << name << ": mkfs.f2fs failed (" << status << ") on " << location;