summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@google.com>2017-11-01 21:24:43 +0100
committerJaegeuk Kim <jaegeuk@google.com>2017-11-13 23:05:00 +0100
commit1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e (patch)
treefc072fe34d311e05b1d04671b6fa902797397762 /updater
parentMerge "applypatch: Change the patch parameter to const Value& in Apply{BSDiff,Image}Patch." (diff)
downloadandroid_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar.gz
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar.bz2
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar.lz
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar.xz
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.tar.zst
android_bootable_recovery-1a8bb0f5421ac9ed7e7de938d2c82c1634abd95e.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/install.cpp14
1 files changed, 10 insertions, 4 deletions
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;