firmware-update: Fix for firmware update status
Issue: Get firmware update status shows as 95% instead 100%
Fix: Provided fix to show correct status of firmware update status
Tested:
1. Updated BMC firmware using fwpiaupd.efi utility
>fwpiaupd.efi -ni -u -o -b -pia <Binary file>
2. Get firmware update status
Command: ipmitool raw 0x08 0x2a
Response: 03 64 00
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I7376c924cc3dc09169d001e358fb0bba69fa6ab7
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index 266fe0c..548cd61 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -392,7 +392,7 @@
"activationTimerTimeout: Increase percentage...",
phosphor::logging::entry("PERCENT:%d", progressPercent));
progressPercent = progressPercent + 5;
- if (progressPercent >= 95)
+ if (progressPercent > 95)
{
/*changing the state to ready to update firmware utility */
fwUpdateState = fwStateUpdateSuccess;
@@ -548,7 +548,7 @@
[&fwUpdateMatchSignal]() { fwUpdateMatchSignal = nullptr; });
static phosphor::Timer activationStatusTimer([]() {
- if (fwUpdateStatus.activationTimerTimeout() >= 95)
+ if (fwUpdateStatus.activationTimerTimeout() > 95)
{
activationStatusTimer.stop();
fwUpdateStatus.setState(