Adriana Kobylak | 4772a94 | 2018-10-09 15:26:44 -0500 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
| 3 | #include "msl_verify.hpp" |
| 4 | |
Adriana Kobylak | 24bb08c | 2018-10-17 19:36:29 -0500 | [diff] [blame] | 5 | #include <phosphor-logging/elog-errors.hpp> |
| 6 | #include <phosphor-logging/elog.hpp> |
| 7 | #include <xyz/openbmc_project/Software/Version/error.hpp> |
| 8 | |
Adriana Kobylak | 4772a94 | 2018-10-09 15:26:44 -0500 | [diff] [blame] | 9 | int main(int argc, char* argv[]) |
| 10 | { |
| 11 | using MinimumShipLevel = openpower::software::image::MinimumShipLevel; |
| 12 | MinimumShipLevel minimumShipLevel(PNOR_MSL); |
| 13 | |
| 14 | if (!minimumShipLevel.verify()) |
| 15 | { |
Adriana Kobylak | 24bb08c | 2018-10-17 19:36:29 -0500 | [diff] [blame] | 16 | using namespace phosphor::logging; |
| 17 | using IncompatibleErr = sdbusplus::xyz::openbmc_project::Software:: |
| 18 | Version::Error::Incompatible; |
| 19 | using Incompatible = |
| 20 | xyz::openbmc_project::Software::Version::Incompatible; |
| 21 | |
| 22 | report<IncompatibleErr>(prev_entry<Incompatible::MIN_VERSION>(), |
| 23 | prev_entry<Incompatible::ACTUAL_VERSION>(), |
| 24 | prev_entry<Incompatible::VERSION_PURPOSE>()); |
Adriana Kobylak | 4772a94 | 2018-10-09 15:26:44 -0500 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | return 0; |
| 28 | } |