Respect that status property when parsing fstab from device tree am: be4302bf58
am: b472ef10c0
Change-Id: I90eccf22b2d5f52f36e5c8ee136c82d5ca0ec552
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp
index e43eb7a..23bd664 100644
--- a/fs_mgr/fs_mgr_fstab.cpp
+++ b/fs_mgr/fs_mgr_fstab.cpp
@@ -404,6 +404,15 @@
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;