Merge "Log failed load_properties_from_file calls."
am: 57513bd5a3
Change-Id: I7cdf54c423c6aa35fb061af31a0bab42614b2768
This commit is contained in:
commit
9abb85ebe0
1 changed files with 7 additions and 7 deletions
|
|
@ -376,17 +376,17 @@ static void load_properties(char *data, const char *filter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Filter is used to decide which properties to load: NULL loads all keys,
|
||||||
* Filter is used to decide which properties to load: NULL loads all keys,
|
// "ro.foo.*" is a prefix match, and "ro.foo.bar" is an exact match.
|
||||||
* "ro.foo.*" is a prefix match, and "ro.foo.bar" is an exact match.
|
|
||||||
*/
|
|
||||||
static void load_properties_from_file(const char* filename, const char* filter) {
|
static void load_properties_from_file(const char* filename, const char* filter) {
|
||||||
Timer t;
|
Timer t;
|
||||||
std::string data;
|
std::string data;
|
||||||
if (read_file(filename, &data)) {
|
if (!read_file(filename, &data)) {
|
||||||
data.push_back('\n');
|
PLOG(WARNING) << "Couldn't load properties from " << filename;
|
||||||
load_properties(&data[0], filter);
|
return;
|
||||||
}
|
}
|
||||||
|
data.push_back('\n');
|
||||||
|
load_properties(&data[0], filter);
|
||||||
LOG(VERBOSE) << "(Loading properties from " << filename << " took " << t.duration() << "s.)";
|
LOG(VERBOSE) << "(Loading properties from " << filename << " took " << t.duration() << "s.)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue