Use make_f2fs -g android by default

It enables encrypt, proejct_quota, verity by default.

Bug: 225401790
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I6c6dc81b8e62b20b0107d40a9ed5b645cdafbda1
This commit is contained in:
Jaegeuk Kim 2022-02-09 13:49:53 -08:00
parent d420cae64e
commit 2b8957dce6

View file

@ -78,30 +78,18 @@ status_t Format(const std::string& source) {
cmd.emplace_back("-f"); cmd.emplace_back("-f");
cmd.emplace_back("-d1"); cmd.emplace_back("-d1");
if (android::base::GetBoolProperty("vold.has_quota", false)) { cmd.emplace_back("-g");
cmd.emplace_back("-O"); cmd.emplace_back("android");
cmd.emplace_back("quota");
}
if (fscrypt_is_native()) {
cmd.emplace_back("-O");
cmd.emplace_back("encrypt");
}
if (android::base::GetBoolProperty("vold.has_compress", false)) { if (android::base::GetBoolProperty("vold.has_compress", false)) {
cmd.emplace_back("-O"); cmd.emplace_back("-O");
cmd.emplace_back("compression"); cmd.emplace_back("compression");
cmd.emplace_back("-O"); cmd.emplace_back("-O");
cmd.emplace_back("extra_attr"); cmd.emplace_back("extra_attr");
} }
cmd.emplace_back("-O");
cmd.emplace_back("verity");
const bool needs_casefold = const bool needs_casefold =
android::base::GetBoolProperty("external_storage.casefold.enabled", false); android::base::GetBoolProperty("external_storage.casefold.enabled", false);
const bool needs_projid = true;
if (needs_projid) {
cmd.emplace_back("-O");
cmd.emplace_back("project_quota,extra_attr");
}
if (needs_casefold) { if (needs_casefold) {
cmd.emplace_back("-O"); cmd.emplace_back("-O");
cmd.emplace_back("casefold"); cmd.emplace_back("casefold");