blob: 1a43faf4c8c787ea6303df7d799789c348a3a645 [file] [log] [blame]
Adriana Kobylak4772a942018-10-09 15:26:44 -05001#include "config.h"
2
3#include "msl_verify.hpp"
4
Adriana Kobylak24bb08c2018-10-17 19:36:29 -05005#include <phosphor-logging/elog-errors.hpp>
6#include <phosphor-logging/elog.hpp>
7#include <xyz/openbmc_project/Software/Version/error.hpp>
8
Brad Bishopc8f22502020-11-06 14:42:09 -05009int main(int, char*[])
Adriana Kobylak4772a942018-10-09 15:26:44 -050010{
11 using MinimumShipLevel = openpower::software::image::MinimumShipLevel;
12 MinimumShipLevel minimumShipLevel(PNOR_MSL);
13
14 if (!minimumShipLevel.verify())
15 {
Adriana Kobylak24bb08c2018-10-17 19:36:29 -050016 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 Kobylak4772a942018-10-09 15:26:44 -050025 }
26
27 return 0;
28}