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

Commit afd0d03b authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "fs_mgr: enable DT fstab based on its status node appropriately" am:...

Merge "fs_mgr: enable DT fstab based on its status node appropriately" am: 612c2854 am: 2125322e
am: 5d09892d

Change-Id: Ib40551e5a7fd701fd8d46b1e7fa84446b304e0f3
parents f0b10126 5d09892d
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -403,10 +403,13 @@ const std::string& get_android_dt_dir() {
static bool is_dt_fstab_compatible() {
    std::string dt_value;
    std::string file_name = get_android_dt_dir() + "/fstab/compatible";
    if (read_dt_file(file_name, &dt_value)) {
        if (dt_value == "android,fstab") {
            return true;
        }

    if (read_dt_file(file_name, &dt_value) && dt_value == "android,fstab") {
        // If there's no status property or its set to "ok" or "okay", then we use the DT fstab.
        std::string status_value;
        std::string status_file_name = get_android_dt_dir() + "/fstab/status";
        return !read_dt_file(status_file_name, &status_value) || status_value == "ok" ||
               status_value == "okay";
    }

    return false;