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

Commit 07052c05 authored by Tao Bao's avatar Tao Bao Committed by android-build-merger
Browse files

Merge "fs_mgr: use different fstab paths for normal/recovery boot"

am: 9c59029a

Change-Id: I1b7d622f1d518f446301c4467fab72107cc4f171
parents e326cb12 9c59029a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -646,7 +646,10 @@ struct fstab *fs_mgr_read_fstab_default()
    std::string hw;
    std::string default_fstab;

    if (fs_mgr_get_boot_config("hardware", &hw)) {
    // Use different fstab paths for normal boot and recovery boot, respectively
    if (access("/sbin/recovery", F_OK) == 0) {
        default_fstab = "/etc/recovery.fstab";
    } else if (fs_mgr_get_boot_config("hardware", &hw)) {  // normal boot
        for (const char *prefix : {"/odm/etc/fstab.","/vendor/etc/fstab.", "/fstab."}) {
            default_fstab = prefix + hw;
            if (access(default_fstab.c_str(), F_OK) == 0) break;