From 451e46f1ae270c11ef3e983602d7c3af774b24ee Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Fri, 28 Apr 2023 16:37:46 -0700 Subject: [PATCH] Adding fastboot-info version to host tool Replacing check with PLATFORM_TOOLS_VERSION with FASTBOOT_INFO_VERSION to indicate waht version of fastboot_info.txt we currently support. This makes mor sense since PLATFORM_TOOLS_VERSION won't be updated every time me make a change to the host tool Test: fastboot flashall Bug: 194686221 Change-Id: I621b62c92ba129f402857463dae9112a0797ab07 --- fastboot/fastboot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index b099f7791..73884abb5 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -95,6 +95,8 @@ using android::base::unique_fd; using namespace std::string_literals; using namespace std::placeholders; +#define FASTBOOT_INFO_VERSION 1 + static const char* serial = nullptr; static bool g_long_listing = false; @@ -1710,9 +1712,7 @@ std::vector> ParseFastbootInfo(const FlashingPlan* fp, continue; } if (command.size() > 1 && command[0] == "version") { - uint32_t platform_tools_version; - android::base::ParseUint(PLATFORM_TOOLS_VERSION, &platform_tools_version); - if (!CheckFastbootInfoRequirements(command, platform_tools_version)) { + if (!CheckFastbootInfoRequirements(command, FASTBOOT_INFO_VERSION)) { return {}; } continue;