diff options
author | Patrick Venture <venture@google.com> | 2018-10-21 09:07:11 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-10-29 09:08:53 -0700 |
commit | a8093a25525555c48ca092e5130f7ff7ffa38006 (patch) | |
tree | 19ea38787f9ba3014480491d8747f6aab91f55be /writefrudata.cpp | |
parent | c7eecc19632571319e39ab8e9f7500f7a5d1b245 (diff) | |
download | ipmi-fru-parser-a8093a25525555c48ca092e5130f7ff7ffa38006.tar.gz ipmi-fru-parser-a8093a25525555c48ca092e5130f7ff7ffa38006.zip |
update: use sdbusplus instead of sd_bus raw pointers
Update code to use sdbusplus instead of raw sd_bus pointers.
Change-Id: I80cd4492480824827c27fbf19eb54487e28d3b75
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'writefrudata.cpp')
-rw-r--r-- | writefrudata.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/writefrudata.cpp b/writefrudata.cpp index 4fbbf72..02cff5f 100644 --- a/writefrudata.cpp +++ b/writefrudata.cpp @@ -144,7 +144,7 @@ auto getService(sdbusplus::bus::bus& bus, const std::string& intf, // Takes FRU data, invokes Parser for each fru record area and updates // Inventory //------------------------------------------------------------------------ -int updateInventory(FruAreaVector& area_vec, sd_bus* bus_sd) +int updateInventory(FruAreaVector& area_vec, sdbusplus::bus::bus& bus) { // Generic error reporter int rc = 0; @@ -173,7 +173,6 @@ int updateInventory(FruAreaVector& area_vec, sd_bus* bus_sd) // Here we are just printing the object,interface and the properties. // which needs to be called with the new inventory manager implementation. - sdbusplus::bus::bus bus{bus_sd}; using namespace std::string_literals; static const auto intf = "xyz.openbmc_project.Inventory.Manager"s; static const auto path = "/xyz/openbmc_project/inventory"s; @@ -514,7 +513,7 @@ int ipmi_validate_common_hdr(const uint8_t* fru_data, const size_t data_len) // Accepts the filename and validates per IPMI FRU spec //---------------------------------------------------- int validateFRUArea(const uint8_t fruid, const char* fru_file_name, - sd_bus* bus_type, const bool bmc_fru) + sdbusplus::bus::bus& bus, const bool bmc_fru) { size_t data_len = 0; size_t bytes_read = 0; @@ -615,7 +614,7 @@ int validateFRUArea(const uint8_t fruid, const char* fru_file_name, #ifdef __IPMI_DEBUG__ std::printf("\n SIZE of vector is : [%d] \n", fru_area_vec.size()); #endif - rc = updateInventory(fru_area_vec, bus_type); + rc = updateInventory(fru_area_vec, bus); if (rc < 0) { log<level::ERR>("Error updating inventory."); |