Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b472ef10 authored by Sandeep Patil's avatar Sandeep Patil Committed by android-build-merger
Browse files

Respect that status property when parsing fstab from device tree

am: be4302bf

Change-Id: Id7fa225c8e77154e6f37e40c5f1e15a7f16c2741
parents 2b496ca4 be4302bf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;