Lines Matching +full:version +full:- +full:minor
4 // Licensed under the Apache License, Version 2.0 (the "License");
8 // http://www.apache.org/licenses/LICENSE-2.0
24 #include <phosphor-logging/elog-errors.hpp>
25 #include <phosphor-logging/lg2.hpp>
26 #include <phosphor-logging/log.hpp>
42 "xyz.openbmc_project.Software.Version";
68 return -1; in initBMCDeviceState()
74 *(ctx->bus), in initBMCDeviceState()
95 std::string* state = std::get_if<std::string>(&it->second); in initBMCDeviceState()
113 return -1; in initBMCDeviceState()
125 * @brief Returns the functional firmware version information.
128 * endpoints association and matching the input version purpose string.
129 * ctx[in] - ipmi context.
130 * reqVersionPurpose[in] - Version purpose which need to be read.
131 * version[out] - Output Version string.
133 * @return Returns '0' on success and '-1' on failure.
138 std::string& version) in getActiveSoftwareVersionInfo() argument
147 "Failed to get Active firmware version endpoints."); in getActiveSoftwareVersionInfo()
148 return -1; in getActiveSoftwareVersionInfo()
170 "Failed to perform GetAll on Version interface.", in getActiveSoftwareVersionInfo()
179 std::get_if<std::string>(&propMap["Version"]); in getActiveSoftwareVersionInfo()
183 "Failed to get version or purpose property"); in getActiveSoftwareVersionInfo()
187 // Check for requested version information and return if found. in getActiveSoftwareVersionInfo()
190 version = *versionProp; in getActiveSoftwareVersionInfo()
196 "Failed to find version information.", in getActiveSoftwareVersionInfo()
198 return -1; in getActiveSoftwareVersionInfo()
202 // 1.Current solution 2.7.0-dev-533-g14dc00e79-5e7d997
203 // openbmcTag 2.7.0-dev
208 // 2.New solution wht-0.2-3-gab3500-38384ac or wht-2000.2.3-gab3500-38384ac
211 // Minor 2
219 std::regex pattern1("(\\d+?).(\\d+?).\\d+?-\\w*?-(\\d+?)-g(\\w+?)-(\\w+?)"); in convertIntelVersion()
227 rev.minor = static_cast<uint8_t>(std::stoi(results[2])); in convertIntelVersion()
233 std::to_string(rev.minor) + ":" + std::to_string(rev.buildNo) + in convertIntelVersion()
236 "Get BMC version", in convertIntelVersion()
237 phosphor::logging::entry("VERSION=%s", versionString.c_str())); in convertIntelVersion()
242 std::regex pattern2("(\\w+?)-(\\d+?).(\\d+?)[-.](\\d+?)-g(\\w+?)-(\\w+?)"); in convertIntelVersion()
249 // Take only the last two digits of the major version in convertIntelVersion()
251 std::stoi(majorVer.substr(majorVer.size() - 2))); in convertIntelVersion()
252 rev.minor = static_cast<uint8_t>(std::stoi(results[3])); in convertIntelVersion()
258 std::to_string(rev.minor) + ":" + std::to_string(rev.buildNo) + in convertIntelVersion()
261 "Get BMC version", in convertIntelVersion()
262 phosphor::logging::entry("VERSION=%s", versionString.c_str())); in convertIntelVersion()
275 // UUID is in RFC4122 format. Ex: 61a39523-78f2-11e5-9862-e6402cfc3223 in rfc4122ToIpmiConvesrion()
284 rfc4122.erase(std::remove(rfc4122.begin(), rfc4122.end(), '-'), in rfc4122ToIpmiConvesrion()
315 uuid[uuidLength - (ind / 2) - 1] = static_cast<uint8_t>(b); in rfc4122ToIpmiConvesrion()
339 // UUID is in RFC4122 format Ex: 61a39523-78f2-11e5-9862-e6402cfc3223 in ipmiAppGetSystemGuid()
375 uint8_t, // Firmware Revision minor
376 uint8_t, // IPMI version
400 const char* filename = "/usr/share/ipmi-providers/dev_id.json"; in ipmiAppGetDeviceId()
415 revision.minor = (revision.minor > 99 ? 99 : revision.minor); in ipmiAppGetDeviceId()
416 devId.fwMinor = revision.minor % 10 + in ipmiAppGetDeviceId()
417 (revision.minor / 10) * 16; in ipmiAppGetDeviceId()
464 // stored in a non-volatile file now. The /usr/bin/checkFru.sh script, in ipmiAppGetDeviceId()
478 // and make sure to re-query the device id. in ipmiAppGetDeviceId()