summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-11-04 22:15:12 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-11-04 22:15:12 +0100
commit88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c (patch)
tree6ec57274514d6716c3d6f802fba49339966d825d /updater
parentMerge "Cleanup the duplicates of logs rotation functions" am: e2d05c5658 am: 99adda9d67 am: 92097726ef (diff)
parentMerge "updater: Add a testcase for RenameFn()." am: d0daf7f7df am: 05a801ca8e (diff)
downloadandroid_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar.gz
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar.bz2
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar.lz
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar.xz
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.tar.zst
android_bootable_recovery-88ee9f61bf989e73a1d56eb2d2a2e6a70610e52c.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/install.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index 25f6a9106..ed55ea517 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -293,7 +293,7 @@ Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) {
}
int64_t size;
- if (!android::base::ParseInt(fs_size.c_str(), &size)) {
+ if (!android::base::ParseInt(fs_size, &size)) {
return ErrorAbort(state, kArgsParsingFailure,
"%s: failed to parse int in %s\n", name, fs_size.c_str());
}
@@ -329,6 +329,9 @@ Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) {
return nullptr;
}
+// rename(src_name, dst_name)
+// Renames src_name to dst_name. It automatically creates the necessary directories for dst_name.
+// Example: rename("system/app/Hangouts/Hangouts.apk", "system/priv-app/Hangouts/Hangouts.apk")
Value* RenameFn(const char* name, State* state, int argc, Expr* argv[]) {
if (argc != 2) {
return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %d", name, argc);