summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2016-01-12 22:54:44 +0100
committerTao Bao <tbao@google.com>2016-01-12 23:08:34 +0100
commitc5631fc09666a9542d2882299d40500d18d1f68c (patch)
tree859048a2d46b59a374a3eee9f9298e3b179b03db
parentMerge "updater: Add a function to check first block" (diff)
downloadandroid_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar.gz
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar.bz2
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar.lz
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar.xz
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.tar.zst
android_bootable_recovery-c5631fc09666a9542d2882299d40500d18d1f68c.zip
-rw-r--r--uncrypt/uncrypt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index 20efbe4df..de7e48182 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -418,8 +418,6 @@ int uncrypt(const char* input_path, const char* map_file, int status_fd) {
}
int main(int argc, char** argv) {
- const char* input_path;
- const char* map_file;
if (argc != 3 && argc != 1 && (argc == 2 && strcmp(argv[1], "--reboot") != 0)) {
fprintf(stderr, "usage: %s [--reboot] [<transform_path> <map_file>]\n", argv[0]);
@@ -443,13 +441,16 @@ int main(int argc, char** argv) {
}
unique_fd status_fd_holder(status_fd);
+ std::string package;
+ const char* input_path;
+ const char* map_file;
+
if (argc == 3) {
// when command-line args are given this binary is being used
// for debugging.
input_path = argv[1];
map_file = argv[2];
} else {
- std::string package;
if (!find_uncrypt_package(package)) {
android::base::WriteStringToFd("-1\n", status_fd);
return 1;