aboutsummaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'recovery.c')
-rw-r--r--recovery.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/recovery.c b/recovery.c
index 6e8555e..9e54147 100644
--- a/recovery.c
+++ b/recovery.c
@@ -716,7 +716,7 @@ prompt_and_wait() {
int status;
switch (chosen_item) {
case ITEM_REBOOT:
- poweroff=0;
+ poweroff = 0;
return;
case ITEM_WIPE_DATA:
@@ -749,10 +749,6 @@ prompt_and_wait() {
case ITEM_ADVANCED:
show_advanced_menu();
break;
-
- case ITEM_POWEROFF:
- poweroff = 1;
- return;
}
}
}
@@ -795,6 +791,13 @@ setup_adbd() {
property_set("service.adb.root", "1");
}
+// call a clean reboot
+void reboot_main_system(int cmd, int flags, char *arg) {
+ verify_root_and_recovery();
+ finish_recovery(NULL); // sync() in here
+ android_reboot(cmd, flags, arg);
+}
+
int
main(int argc, char **argv) {