Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8afef8c1 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Tom Marshall
Browse files

recovery: format f2fs with encrypt/quota



Change-Id: Ia393b7b78b45f09964449ec0e255aa26bb3b8ddf
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit 1a8bb0f5)
parent 312e0e7b
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -354,10 +354,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;