summaryrefslogtreecommitdiffstats
path: root/twinstall.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-03-20 23:28:13 +0100
committerMatt Mower <mowerm@gmail.com>2014-03-27 22:14:59 +0100
commit6883d73d0dc927af85626bedc629519ce32f7efb (patch)
treea6ad9e917974e35099b3db55fa1ffb4e302d6cec /twinstall.cpp
parentAdd basic error checking to legacy property init (diff)
downloadandroid_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar.gz
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar.bz2
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar.lz
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar.xz
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.tar.zst
android_bootable_recovery-6883d73d0dc927af85626bedc629519ce32f7efb.zip
Diffstat (limited to 'twinstall.cpp')
-rw-r--r--twinstall.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/twinstall.cpp b/twinstall.cpp
index 5b3242756..4b055a3aa 100644
--- a/twinstall.cpp
+++ b/twinstall.cpp
@@ -162,12 +162,14 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
}
mzCloseZipArchive(Zip);
+#ifndef TW_NO_LEGACY_PROPS
/* Set legacy properties */
if (switch_to_legacy_properties() != 0) {
LOGERR("Legacy property environment did not initialize successfully. Properties may not be detected.\n");
} else {
LOGINFO("Legacy property environment initialized.\n");
}
+#endif
pipe(pipe_fd);
@@ -230,6 +232,7 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
waitpid(pid, &status, 0);
+#ifndef TW_NO_LEGACY_PROPS
/* Unset legacy properties */
if (legacy_props_path_modified) {
if (switch_to_new_properties() != 0) {
@@ -238,6 +241,7 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
LOGINFO("Legacy property environment disabled.\n");
}
}
+#endif
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
LOGERR("Error executing updater binary in zip '%s'\n", path);