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

Commit 7e7b7a15 authored by Jiyong Park's avatar Jiyong Park
Browse files

Search fstab also from /first_stage_ramdisk

I828ce999be6d786bf46dd5655dfda81d046906ab made a slight behaviral change
that fstab is searched and read before /first_stage_ramdisk is mounted
as root. Without this change, the attempt to read fstab from / fails at
the moment, leaving an empty fstab object. But as a side effect of the
attempt, DoCreateDevices() is not called again even after
/first_stage_ramdisk is mounted as root and the fstab is found under /.

This change fixes the problem by adding /first_stage_ramdisk to the list
of places to find the fstab file.

Bug: N/A
Test: Watch TH
Change-Id: I9826610cce436ba706aaea14c9a991822d2bae96
parent 5060516c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -412,7 +412,8 @@ std::string GetFstabPath() {

        if (!fs_mgr_get_boot_config(prop, &suffix)) continue;

        for (const char* prefix : {"/odm/etc/fstab.", "/vendor/etc/fstab.", "/fstab."}) {
        for (const char* prefix :
             {"/odm/etc/fstab.", "/vendor/etc/fstab.", "/fstab.", "/first_stage_ramdisk/fstab."}) {
            std::string fstab_path = prefix + suffix;
            if (access(fstab_path.c_str(), F_OK) == 0) {
                return fstab_path;