Respect that status property when parsing fstab from device tree
For an fstab entry in device tree, fs_mgr now honors the status property as done by linux. i.e. the node (in this case, the fstab entry) is enabled if status is not set, "ok" or "okay". For every other value, the node is considered as disabled. Bug: 62127741 Test: Test sailfish w/ no status property, result: boots Test: Test with status = "disabled", result: skips mounting /vendor Test: Test with status = "ok", result: boots Change-Id: I5ff8f710de2c54afc76b4af28108ca9075357ad1 Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
parent
e57b353597
commit
be4302bf58
1 changed files with 9 additions and 0 deletions
|
|
@ -397,6 +397,15 @@ static std::string read_fstab_from_dt() {
|
|||
std::vector<std::string> fstab_entry;
|
||||
std::string file_name;
|
||||
std::string value;
|
||||
// skip a partition entry if the status property is present and not set to ok
|
||||
file_name = android::base::StringPrintf("%s/%s/status", fstabdir_name.c_str(), dp->d_name);
|
||||
if (read_dt_file(file_name, &value)) {
|
||||
if (value != "okay" && value != "ok") {
|
||||
LINFO << "dt_fstab: Skip disabled entry for partition " << dp->d_name;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
file_name = android::base::StringPrintf("%s/%s/dev", fstabdir_name.c_str(), dp->d_name);
|
||||
if (!read_dt_file(file_name, &value)) {
|
||||
LERROR << "dt_fstab: Failed to find device for partition " << dp->d_name;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue