From 6e4472abbd3c7be9cd31d98a03df1e3b6fa92f40 Mon Sep 17 00:00:00 2001 From: Ken Sumrall Date: Mon, 7 Mar 2011 23:37:27 -0800 Subject: Have recovery reboot using the new android_reboot() function. The new android_reboot() function is a nicer way to reboot the system. I can optionally sync() and remount read-only writable filesystems. This fixes bug 3350709. Change-Id: Ic4c8676debd642e57bce3107b99dd810d90b6f82 --- recovery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index 14fc905c2..fd7ce42f1 100644 --- a/recovery.c +++ b/recovery.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -33,6 +32,7 @@ #include "bootloader.h" #include "common.h" #include "cutils/properties.h" +#include "cutils/android_reboot.h" #include "install.h" #include "minui/minui.h" #include "minzip/DirUtil.h" @@ -768,7 +768,6 @@ main(int argc, char **argv) { // Otherwise, get ready to boot the main system... finish_recovery(send_intent); ui_print("Rebooting...\n"); - sync(); - reboot(RB_AUTOBOOT); + android_reboot(ANDROID_RB_RESTART, 0, 0); return EXIT_SUCCESS; } -- cgit v1.2.3