summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-10-19 19:51:12 +0200
committerDoug Zongker <dougz@android.com>2011-10-19 20:26:18 +0200
commitd0181b8fcdac761afec252151a8bfda116916e96 (patch)
treec878f12af3461775fe971b1a935783d08c6e9d62 /updater
parentminui: add ability to synchronize current key state (diff)
downloadandroid_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar.gz
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar.bz2
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar.lz
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar.xz
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.tar.zst
android_bootable_recovery-d0181b8fcdac761afec252151a8bfda116916e96.zip
Diffstat (limited to '')
-rw-r--r--updater/install.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 0396bae6c..7b4b99b01 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1024,6 +1024,14 @@ Value* UIPrintFn(const char* name, State* state, int argc, Expr* argv[]) {
return StringValue(buffer);
}
+Value* WipeCacheFn(const char* name, State* state, int argc, Expr* argv[]) {
+ if (argc != 0) {
+ return ErrorAbort(state, "%s() expects no args, got %d", name, argc);
+ }
+ fprintf(((UpdaterInfo*)(state->cookie))->cmd_pipe, "wipe_cache\n");
+ return StringValue(strdup("t"));
+}
+
Value* RunProgramFn(const char* name, State* state, int argc, Expr* argv[]) {
if (argc < 1) {
return ErrorAbort(state, "%s() expects at least 1 arg", name);
@@ -1198,6 +1206,8 @@ void RegisterInstallFunctions() {
RegisterFunction("read_file", ReadFileFn);
RegisterFunction("sha1_check", Sha1CheckFn);
+ RegisterFunction("wipe_cache", WipeCacheFn);
+
RegisterFunction("ui_print", UIPrintFn);
RegisterFunction("run_program", RunProgramFn);