Log failed load_properties_from_file calls.

These events are _somewhat_ normal, in that not all devices have all
partitions, but not logging anything makes it unnecessarily hard for
folks to debug simple failures.

Bug: http://b/31186390
Test: booted, checked dmesg
Change-Id: I403377c585ea35cfe73b0bed9443b75e3a84dc8d
This commit is contained in:
Elliott Hughes 2016-09-30 14:12:33 -07:00
parent e5976bea7a
commit 5a7ad84ede
1 changed files with 7 additions and 7 deletions

View File

@ -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,
* "ro.foo.*" is a prefix match, and "ro.foo.bar" is an exact match.
*/
// 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.
static void load_properties_from_file(const char* filename, const char* filter) {
Timer t;
std::string data;
if (read_file(filename, &data)) {
data.push_back('\n');
load_properties(&data[0], filter);
if (!read_file(filename, &data)) {
PLOG(WARNING) << "Couldn't load properties from " << filename;
return;
}
data.push_back('\n');
load_properties(&data[0], filter);
LOG(VERBOSE) << "(Loading properties from " << filename << " took " << t.duration() << "s.)";
}