summaryrefslogtreecommitdiffstats
path: root/updater/install.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-05-23 17:40:35 +0200
committerDoug Zongker <dougz@android.com>2014-05-23 17:52:31 +0200
commitc704e06ce596bd0a6de66b10b108aee95535468a (patch)
tree3005b89333b7500aaa78e0867e377eac2f0280ab /updater/install.c
parentam 502e4595: am d1c64060: am 5fbb729f: Merge "exit instead of return if sideload file creation fails" (diff)
downloadandroid_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.gz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.bz2
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.lz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.xz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.zst
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.zip
Diffstat (limited to 'updater/install.c')
-rw-r--r--updater/install.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 8defc7720..e1071c90c 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1640,6 +1640,15 @@ Value* WipeBlockDeviceFn(const char* name, State* state, int argc, Expr* argv[])
return StringValue(strdup(success ? "t" : ""));
}
+Value* EnableRebootFn(const char* name, State* state, int argc, Expr* argv[]) {
+ if (argc != 0) {
+ return ErrorAbort(state, "%s() expects no args, got %d", name, argc);
+ }
+ UpdaterInfo* ui = (UpdaterInfo*)(state->cookie);
+ fprintf(ui->cmd_pipe, "enable_reboot\n");
+ return StringValue(strdup("t"));
+}
+
void RegisterInstallFunctions() {
RegisterFunction("mount", MountFn);
RegisterFunction("is_mounted", IsMountedFn);
@@ -1689,4 +1698,6 @@ void RegisterInstallFunctions() {
RegisterFunction("reboot_now", RebootNowFn);
RegisterFunction("get_stage", GetStageFn);
RegisterFunction("set_stage", SetStageFn);
+
+ RegisterFunction("enable_reboot", EnableRebootFn);
}