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

Commit 9539cdb3 authored by Tao Bao's avatar Tao Bao Committed by android-build-merger
Browse files

Merge "updater: Update the mkfs.f2fs argument to match f2fs-tools 1.8.0." am: 494d97fe

am: 843ca31c

Change-Id: I3f7c6b2d4b4d7b56866f98e146cb3bf691a7a3f3
parents e89cbd67 843ca31c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -317,9 +317,11 @@ 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* const f2fs_argv[] = { "mkfs.f2fs", "-t", "-d1", location.c_str(),
                                      num_sectors.c_str(), nullptr };
    int status = exec_cmd(f2fs_path, const_cast<char* const*>(f2fs_argv));
    const char* f2fs_argv[] = {
      "mkfs.f2fs", "-t", "-d1", 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;
      return StringValue("");