Snap for 4459973 from 318b07d7c6 to pi-release

Change-Id: Ia2179b41c8ef84a7e10f886041996d8644fedc4a
gugelfrei
android-build-team Robot 7 years ago
commit fcd9e96494

@ -18,7 +18,9 @@
#include "Utils.h"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <ext4_utils/ext4_crypt.h>
#include <vector>
#include <string>
@ -72,8 +74,19 @@ status_t Mount(const std::string& source, const std::string& target) {
status_t Format(const std::string& source) {
std::vector<std::string> cmd;
cmd.push_back(kMkfsPath);
cmd.push_back(source);
cmd.push_back("-f");
cmd.push_back("-d1");
if (android::base::GetBoolProperty("vold.has_quota", false)) {
cmd.push_back("-O");
cmd.push_back("quota");
}
if (e4crypt_is_native()) {
cmd.push_back("-O");
cmd.push_back("encrypt");
}
cmd.push_back(source);
return ForkExecvp(cmd);
}

Loading…
Cancel
Save