From 9d0361068026adab7ab3797c66ddf25d8d39f6c9 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Thu, 11 Aug 2022 14:53:12 +0800 Subject: [PATCH] remount: On initial overlay setup, return 0 instead of MUST_REBOOT aosp/I212bdb0e97016dec50618962d7c24f46d35764c7 changes `remount` to return MUST_REBOOT after initial overlay setup. This causes DsuGsiIntegrationTest to fail because the non-zero exit code cause the test script to think the `remount` command failed. Change it so that we return 0 instead, to indicate that we "successfully" setup a new overlay. We should only return non-zero on unrecoverable error, like when we failed to disable verity, failed to setup overlay, failed to perform MS_REMOUNT. Bug: 241179247 Test: DsuGsiIntegrationTest Change-Id: I280ffa988118c59e366cdd5bd1479bb43896c278 --- fs_mgr/fs_mgr_remount.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs_mgr/fs_mgr_remount.cpp b/fs_mgr/fs_mgr_remount.cpp index 86d095ec4..01517b036 100644 --- a/fs_mgr/fs_mgr_remount.cpp +++ b/fs_mgr/fs_mgr_remount.cpp @@ -128,7 +128,6 @@ enum RemountStatus { BAD_OVERLAY, NO_MOUNTS, REMOUNT_FAILED, - MUST_REBOOT, BINDER_ERROR, CHECKPOINTING, GSID_ERROR, @@ -581,7 +580,7 @@ int main(int argc, char* argv[]) { } else { LOG(INFO) << "Now reboot your device for settings to take effect"; } - return MUST_REBOOT; + return REMOUNT_SUCCESS; } if (result == REMOUNT_SUCCESS) { printf("remount succeeded\n");