Loading fs_mgr/fs_mgr_remount.cpp +24 −16 Original line number Diff line number Diff line Loading @@ -105,9 +105,8 @@ void MyLogger(android::base::LogId id, android::base::LogSeverity severity, cons } // namespace static int do_remount(int argc, char* argv[]) { enum { SUCCESS = 0, enum RemountStatus { REMOUNT_SUCCESS = 0, NOT_USERDEBUG, BADARG, NOT_ROOT, Loading @@ -118,7 +117,11 @@ static int do_remount(int argc, char* argv[]) { BAD_OVERLAY, NO_MOUNTS, REMOUNT_FAILED, } retval = SUCCESS; MUST_REBOOT }; static int do_remount(int argc, char* argv[]) { RemountStatus retval = REMOUNT_SUCCESS; // If somehow this executable is delivered on a "user" build, it can // not function, so providing a clear message to the caller rather than Loading Loading @@ -304,8 +307,7 @@ static int do_remount(int argc, char* argv[]) { if (partitions.empty() || just_disabled_verity) { if (reboot_later) reboot(setup_overlayfs); if (user_please_reboot_later) { LOG(INFO) << "Now reboot your device for settings to take effect"; return 0; return MUST_REBOOT; } LOG(WARNING) << "No partitions to remount"; return retval; Loading Loading @@ -394,6 +396,12 @@ static int do_remount(int argc, char* argv[]) { int main(int argc, char* argv[]) { android::base::InitLogging(argv, MyLogger); int result = do_remount(argc, argv); printf("remount %s\n", result ? "failed" : "succeeded"); if (result == MUST_REBOOT) { LOG(INFO) << "Now reboot your device for settings to take effect"; } else if (result == REMOUNT_SUCCESS) { printf("remount succeeded\n"); } else { printf("remount failed\n"); } return result; } Loading
fs_mgr/fs_mgr_remount.cpp +24 −16 Original line number Diff line number Diff line Loading @@ -105,9 +105,8 @@ void MyLogger(android::base::LogId id, android::base::LogSeverity severity, cons } // namespace static int do_remount(int argc, char* argv[]) { enum { SUCCESS = 0, enum RemountStatus { REMOUNT_SUCCESS = 0, NOT_USERDEBUG, BADARG, NOT_ROOT, Loading @@ -118,7 +117,11 @@ static int do_remount(int argc, char* argv[]) { BAD_OVERLAY, NO_MOUNTS, REMOUNT_FAILED, } retval = SUCCESS; MUST_REBOOT }; static int do_remount(int argc, char* argv[]) { RemountStatus retval = REMOUNT_SUCCESS; // If somehow this executable is delivered on a "user" build, it can // not function, so providing a clear message to the caller rather than Loading Loading @@ -304,8 +307,7 @@ static int do_remount(int argc, char* argv[]) { if (partitions.empty() || just_disabled_verity) { if (reboot_later) reboot(setup_overlayfs); if (user_please_reboot_later) { LOG(INFO) << "Now reboot your device for settings to take effect"; return 0; return MUST_REBOOT; } LOG(WARNING) << "No partitions to remount"; return retval; Loading Loading @@ -394,6 +396,12 @@ static int do_remount(int argc, char* argv[]) { int main(int argc, char* argv[]) { android::base::InitLogging(argv, MyLogger); int result = do_remount(argc, argv); printf("remount %s\n", result ? "failed" : "succeeded"); if (result == MUST_REBOOT) { LOG(INFO) << "Now reboot your device for settings to take effect"; } else if (result == REMOUNT_SUCCESS) { printf("remount succeeded\n"); } else { printf("remount failed\n"); } return result; }