From 1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 1 Nov 2017 13:24:43 -0700 Subject: recovery: format f2fs with encrypt/quota Change-Id: Ia393b7b78b45f09964449ec0e255aa26bb3b8ddf Signed-off-by: Jaegeuk Kim --- roots.cpp | 4 +++- updater/install.cpp | 14 ++++++++++---- 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 f2fs_args = { "/sbin/mkfs.f2fs", "-t", "-d1", v->blk_device }; + std::vector 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(f2fs_argv)); if (status != 0) { LOG(ERROR) << name << ": mkfs.f2fs failed (" << status << ") on " << location; -- cgit v1.2.3