libprocessgroup: Change LogFailures to string
To match the definition of proto file. Bug: 184715843 Test: function works Change-Id: I1ef4b3509069d8c83e8afd192c72edf62c772c26
This commit is contained in:
parent
b20e9a3606
commit
49fce9571a
|
@ -518,10 +518,10 @@ bool TaskProfiles::Load(const CgroupMap& cg_map, const std::string& file_name) {
|
|||
std::string attr_filepath = params_val["FilePath"].asString();
|
||||
std::string attr_value = params_val["Value"].asString();
|
||||
if (!attr_filepath.empty() && !attr_value.empty()) {
|
||||
const Json::Value& logfailures = params_val["LogFailures"];
|
||||
bool attr_logfailures = logfailures.isNull() || logfailures.asBool();
|
||||
std::string attr_logfailures = params_val["LogFailures"].asString();
|
||||
bool logfailures = attr_logfailures.empty() || attr_logfailures == "true";
|
||||
profile->Add(std::make_unique<WriteFileAction>(attr_filepath, attr_value,
|
||||
attr_logfailures));
|
||||
logfailures));
|
||||
} else if (attr_filepath.empty()) {
|
||||
LOG(WARNING) << "WriteFile: invalid parameter: "
|
||||
<< "empty filepath";
|
||||
|
|
Loading…
Reference in New Issue