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
diff --git a/fs_mgr/fs_mgr_remount.cpp b/fs_mgr/fs_mgr_remount.cpp
index 86d095e..01517b0 100644
--- a/fs_mgr/fs_mgr_remount.cpp
+++ b/fs_mgr/fs_mgr_remount.cpp
@@ -128,7 +128,6 @@
BAD_OVERLAY,
NO_MOUNTS,
REMOUNT_FAILED,
- MUST_REBOOT,
BINDER_ERROR,
CHECKPOINTING,
GSID_ERROR,
@@ -581,7 +580,7 @@
} 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");