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.
Merged-In: I5ff8f710de2c54afc76b4af28108ca9075357ad1
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>
(cherry picked from commit be4302bf58
)
This commit is contained in:
parent
844940d751
commit
02a5108308
|
@ -352,6 +352,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…
Reference in New Issue