make_f2fs: specify sector size for target image size
am: 9a67c69e6c
Change-Id: I4e9f33855fbb88d56bb44911e87201d71d7604df
This commit is contained in:
commit
700aa2f9b0
1 changed files with 12 additions and 3 deletions
|
@ -114,10 +114,19 @@ static int format_f2fs(char *fs_blkdev, uint64_t dev_sz, bool crypt_footer)
|
|||
}
|
||||
|
||||
std::string size_str = std::to_string(dev_sz / 4096);
|
||||
// clang-format off
|
||||
const char* const args[] = {
|
||||
"/system/bin/make_f2fs", "-d1", "-f",
|
||||
"-O", "encrypt", "-O", "quota",
|
||||
fs_blkdev, size_str.c_str(), nullptr};
|
||||
"/system/bin/make_f2fs",
|
||||
"-d1",
|
||||
"-f",
|
||||
"-O", "encrypt",
|
||||
"-O", "quota",
|
||||
"-w", "4096",
|
||||
fs_blkdev,
|
||||
size_str.c_str(),
|
||||
nullptr
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), NULL, true,
|
||||
LOG_KLOG, true, nullptr, nullptr, 0);
|
||||
|
|
Loading…
Reference in a new issue