summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2011-03-11 04:44:38 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-11 04:44:38 +0100
commit90415aca670f0d0475a71634880e7c5c81c007c0 (patch)
tree2cffd23c946b1d84de4ebe06b3114507c933dd21
parentam 6ce4a326: don\'t reboot for inactivity if USB is connected (diff)
parentHave recovery reboot using the new android_reboot() function. (diff)
downloadandroid_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar.gz
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar.bz2
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar.lz
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar.xz
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.tar.zst
android_bootable_recovery-90415aca670f0d0475a71634880e7c5c81c007c0.zip
-rw-r--r--recovery.c5
-rw-r--r--ui.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/recovery.c b/recovery.c
index 14fc905c2..fd7ce42f1 100644
--- a/recovery.c
+++ b/recovery.c
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/reboot.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
@@ -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;
}
diff --git a/ui.c b/ui.c
index 179eb2ae6..0744da4d9 100644
--- a/ui.c
+++ b/ui.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/reboot.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -30,6 +29,7 @@
#include <unistd.h>
#include "common.h"
+#include <cutils/android_reboot.h>
#include "minui/minui.h"
#include "recovery_ui.h"
@@ -358,7 +358,7 @@ static void *input_thread(void *cookie)
}
if (ev.value > 0 && device_reboot_now(key_pressed, ev.code)) {
- reboot(RB_AUTOBOOT);
+ android_reboot(ANDROID_RB_RESTART, 0, 0);
}
}
return NULL;