From c984d655c2f52e87a985bb318d95c3ccc0bd1d48 Mon Sep 17 00:00:00 2001 From: Steven Tsai Date: Thu, 4 Jul 2024 20:08:40 +0800 Subject: [PATCH] Support AR one-shot fuse on the new platform Bug: 351059371 Flag: EXEMPT bugfix Change-Id: I14faf995aa259b607300616ba1a1ea6d24a92d2a Signed-off-by: Steven Tsai --- bootctrl/1.2/BootControl.cpp | 10 +++++----- bootctrl/aidl/BootControl.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bootctrl/1.2/BootControl.cpp b/bootctrl/1.2/BootControl.cpp index ff02013..54764a0 100644 --- a/bootctrl/1.2/BootControl.cpp +++ b/bootctrl/1.2/BootControl.cpp @@ -19,6 +19,7 @@ #include "BootControl.h" #include +#include #include #include #include @@ -254,16 +255,15 @@ static bool blowAR_gs101() { } static bool blowAR() { - char platform[PROPERTY_VALUE_MAX]; - property_get("ro.boot.hardware.platform", platform, ""); + const auto& platform = ::android::base::GetProperty("ro.boot.hardware.platform", ""); - if (std::string(platform) == "gs101") { + if (platform == "gs101") { return blowAR_gs101(); - } else if (std::string(platform) == "gs201" || std::string(platform) == "zuma") { + } else if (platform == "gs201" || platform == "zuma" || platform == "zumapro") { return blowAR_zuma(); } - return true; + return false; } } // namespace diff --git a/bootctrl/aidl/BootControl.cpp b/bootctrl/aidl/BootControl.cpp index e771845..83deb72 100644 --- a/bootctrl/aidl/BootControl.cpp +++ b/bootctrl/aidl/BootControl.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -251,16 +252,15 @@ static bool blowAR_gs101() { } static bool blowAR() { - char platform[PROPERTY_VALUE_MAX]; - property_get("ro.boot.hardware.platform", platform, ""); + const auto& platform = ::android::base::GetProperty("ro.boot.hardware.platform", ""); - if (std::string(platform) == "gs101") { + if (platform == "gs101") { return blowAR_gs101(); - } else if (std::string(platform) == "gs201" || std::string(platform) == "zuma") { + } else if (platform == "gs201" || platform == "zuma" || platform == "zumapro") { return blowAR_zuma(); } - return true; + return false; } static constexpr MergeStatus ToAIDLMergeStatus(HIDLMergeStatus status) {