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
This commit is contained in:
parent
5060516c6f
commit
7e7b7a156a
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue