Don't emit warning on missing directories
Some directories (e.g., /product/bin, etc.) in ld.config.txt may not exist in some devices. Since many of them are optional directories, don't emit warning when realpath() gives ENOENT for the paths. Test: m -j Change-Id: Ic4fa7db05bde53d3aa5df47291e83b4cdc09aa1f
This commit is contained in:
parent
23f86f4f34
commit
d3c08f28a3
|
@ -240,13 +240,16 @@ static bool parse_config_file(const char* ld_config_file_path,
|
|||
std::string resolved_path;
|
||||
if (realpath(value.c_str(), buf)) {
|
||||
resolved_path = buf;
|
||||
} else {
|
||||
} else if (errno != ENOENT) {
|
||||
DL_WARN("%s:%zd: warning: path \"%s\" couldn't be resolved: %s",
|
||||
ld_config_file_path,
|
||||
cp.lineno(),
|
||||
value.c_str(),
|
||||
strerror(errno));
|
||||
resolved_path = value;
|
||||
} else {
|
||||
// ENOENT: no need to test if binary is under the path
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file_is_under_dir(binary_realpath, resolved_path)) {
|
||||
|
|
Loading…
Reference in New Issue