blob: 1810632695897222fa51c7ac5a5ed4e479488e1e [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
Adriana Kobylak4772a942018-10-09 15:26:44 -05009int 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 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}