aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-05-04 15:03:18 -0500
committerTao Bao2017-09-13 12:51:09 -0500
commitbd0ddcd5e8794511395bf668833acc5c2da69fb0 (patch)
tree4e9b138c4234d80b88cc856effa3f55e340044f5 /install.cpp
parent64307daf5b178af9c899f3a17be42fb294eeac1c (diff)
downloadplatform-bootable-recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.gz
platform-bootable-recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.xz
platform-bootable-recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.zip
Remove EXPAND/STRINGIFY macros.
This reverts commit 8be0f39fec7f26164fd0791ff6d15bde65fc849c to reland the change that removes EXPAND/STRINGIFY macros. It's error-prone by putting anything into a string (e.g. EXPAND(RECOVERY_API_VERSION) would become "RECOVER_API_VERSION" if we forgot to pass -DRECOVERY_API_VERSION=3). The initial attempt put RECOVERY_API_VERSION into common.h, which might be included by device-specific codes but without defining that when compiling the module. This CL avoids the issue by using a constant in the header, with a static_assert in recovery.cpp that guards the consistency. Test: recovery_component_test Test: Sideload OTAs on bullhead and sailfish respectively. Change-Id: I12af3f73392a85554ba703f04970ec9d984ccbaa
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp
index 586dbbe2..507161c2 100644
--- a/install.cpp
+++ b/install.cpp
@@ -290,7 +290,7 @@ int update_binary_command(const std::string& package, ZipArchiveHandle zip,
290 290
291 *cmd = { 291 *cmd = {
292 binary_path, 292 binary_path,
293 EXPAND(RECOVERY_API_VERSION), // defined in Android.mk 293 std::to_string(kRecoveryApiVersion),
294 std::to_string(status_fd), 294 std::to_string(status_fd),
295 package, 295 package,
296 }; 296 };