Lines Matching +full:version +full:- +full:minor

5 #include <phosphor-logging/log.hpp>
23 int MinimumShipLevel::compare(const Version& a, const Version& b) in compare()
27 return -1; in compare()
34 if (a.minor < b.minor) in compare()
36 return -1; in compare()
38 else if (a.minor > b.minor) in compare()
45 return -1; in compare()
55 void MinimumShipLevel::parse(const std::string& versionStr, Version& version) in parse() argument
58 version = {0, 0, 0}; in parse()
60 // Match for vX.Y.Z or v-X.Y.Z in parse()
61 std::regex regex{"v-?([0-9]+)\\.([0-9]+)\\.([0-9]+)", std::regex::extended}; in parse()
65 // Match for vX.Y or v-X.Y in parse()
66 std::regex regexShort{"v-?([0-9]+)\\.([0-9]+)", std::regex::extended}; in parse()
69 log<level::ERR>("Unable to parse PNOR version", in parse()
70 entry("VERSION=%s", versionStr.c_str())); in parse()
77 version.rev = std::stoi(match[3]); in parse()
79 version.major = std::stoi(match[1]); in parse()
80 version.minor = std::stoi(match[2]); in parse()
117 method.append(VERSION_IFACE, "Version"); in getFunctionalVersion()
129 "Failed to read version property", in getFunctionalVersion()
160 // In order to handle non-continuous multiple min versions, need to compare in verify()
161 // the major.minor section first, then if they're the same, compare the rev. in verify()
165 // 2. Zero out the rev number to just compare major and minor. in verify()
166 Version actualVersion = {0, 0, 0}; in verify()
168 Version actualRev = {0, 0, actualVersion.rev}; in verify()
178 Version minVersion = {0, 0, 0}; in verify()
180 Version minRev = {0, 0, minVersion.rev}; in verify()
190 // Same major.minor version, compare the rev in verify()
202 "xyz.openbmc_project.Software.Version.VersionPurpose.Host")); in verify()