utils.cpp (16c2a0a03e5daac77e204eb99e00711490fb6e26) | utils.cpp (04ac9971cece872021e01afd3890cd3ffff6eb39) |
---|---|
1#include "utils.hpp" 2 3#include "common/utils.hpp" 4 5#include <libpldm/base.h> 6#include <libpldm/platform.h> 7#include <sys/socket.h> 8#include <sys/types.h> --- 227 unchanged lines hidden (view full) --- 236 std::to_string(parent.entity_instance_num)); 237 static constexpr auto searchpath = "/xyz/openbmc_project/"; 238 std::vector<std::string> cpuInterface = { 239 "xyz.openbmc_project.Inventory.Item.Cpu"}; 240 pldm::utils::GetSubTreeResponse response = dBusIntf->getSubtree( 241 searchpath, 0 /* depth */, cpuInterface); 242 for (const auto& [objectPath, serviceMap] : response) 243 { | 1#include "utils.hpp" 2 3#include "common/utils.hpp" 4 5#include <libpldm/base.h> 6#include <libpldm/platform.h> 7#include <sys/socket.h> 8#include <sys/types.h> --- 227 unchanged lines hidden (view full) --- 236 std::to_string(parent.entity_instance_num)); 237 static constexpr auto searchpath = "/xyz/openbmc_project/"; 238 std::vector<std::string> cpuInterface = { 239 "xyz.openbmc_project.Inventory.Item.Cpu"}; 240 pldm::utils::GetSubTreeResponse response = dBusIntf->getSubtree( 241 searchpath, 0 /* depth */, cpuInterface); 242 for (const auto& [objectPath, serviceMap] : response) 243 { |
244 // find the object path with first occurance of coreX | 244 // find the object path with first occurrence of coreX |
245 if (objectPath.contains(grepWord)) 246 { 247 pldm::utils::DBusMapping dbusMapping{ 248 objectPath, cpuInterface[0], "CoreCount", 249 "uint16_t"}; 250 pldm::utils::PropertyValue value = 251 static_cast<uint16_t>(coreCount); 252 try --- 25 unchanged lines hidden --- | 245 if (objectPath.contains(grepWord)) 246 { 247 pldm::utils::DBusMapping dbusMapping{ 248 objectPath, cpuInterface[0], "CoreCount", 249 "uint16_t"}; 250 pldm::utils::PropertyValue value = 251 static_cast<uint16_t>(coreCount); 252 try --- 25 unchanged lines hidden --- |