PNOR: Switch Software Version based on priority.
If the user specifically sets the priority of a version
to the lowest value, then we need to update the symlinks
and change PNOR current version.
Change-Id: I8bb46800e30ec0afd7726cceb8566915a48b5e88
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index 7a56775..7466d12 100755
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -227,6 +227,21 @@
}
}
+bool ItemUpdater::isLowestPriority(uint8_t value)
+{
+ for (const auto& intf : activations)
+ {
+ if(intf.second->redundancyPriority)
+ {
+ if (intf.second->redundancyPriority.get()->priority() < value)
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
} // namespace updater
} // namespace software
} // namespace openpower