From 8fe363f26017e39b80c6cd793f7b2a346da88104 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Mon, 30 Apr 2018 16:13:42 +0800 Subject: [PATCH] First-stage mount: avoid triggering a FATAL error Related AOSP changes: 1. https://android-review.googlesource.com/#/c/platform/system/core/+/405009/ 2. https://android-review.googlesource.com/#/c/platform/system/core/+/532637/ The second CL raises a FATAL error when it detects fstab-dt has no content during first-stage mount. However, with the first CL, the fstab-dt entry might be "skipped" when bootloader sets the status property to a value other than "ok"/"okay". (e.g., to skip mounting /vendor on upgrading devices which have no vendor partition). Use LOG(INFO) when there is nothing to mount here. The later stages should trigger a FATAL error when some important files in those partitions are not available, e.g., SEPolicy files. Bug: 78441220 Test: boot a device Change-Id: Iae2f47d455679298bdb067d96b771a30c1a82e6f --- init/init_first_stage.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/init/init_first_stage.cpp b/init/init_first_stage.cpp index 0f4cc68a2..45d3d4499 100644 --- a/init/init_first_stage.cpp +++ b/init/init_first_stage.cpp @@ -119,10 +119,7 @@ static bool inline IsRecoveryMode() { FirstStageMount::FirstStageMount() : need_dm_verity_(false), device_tree_fstab_(fs_mgr_read_fstab_dt(), fs_mgr_free_fstab) { if (!device_tree_fstab_) { - // The client of FirstStageMount should check the existence of fstab in device-tree - // in advance, without parsing it. Reaching here means there is a FATAL error when - // parsing the fstab. So stop here to expose the failure. - LOG(FATAL) << "Failed to read fstab from device tree"; + LOG(INFO) << "Failed to read fstab from device tree"; return; } // Stores device_tree_fstab_->recs[] into mount_fstab_recs_ (vector)