Merge "fs_mgr: Ignore invalid DT device nodes" am: d457091c3d

am: cf299d4a66

Change-Id: I84366c584c46f656d6cf71f30243bf5d9f07e053
This commit is contained in:
Tom Marshall 2018-03-09 03:00:30 +00:00 committed by android-build-merger
commit 57589be5a1
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,8 @@
#include "fs_mgr_priv.h"
using android::base::StartsWith;
const std::string kDefaultAndroidDtDir("/proc/device-tree/firmware/android");
struct fs_mgr_flag_values {
@ -439,6 +441,10 @@ static std::string read_fstab_from_dt() {
LERROR << "dt_fstab: Failed to find device for partition " << dp->d_name;
return {};
}
if (!StartsWith(value, "/dev")) {
LERROR << "dt_fstab: Invalid device node for partition " << dp->d_name;
return {};
}
fstab_entry.push_back(value);
std::string mount_point;