summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2017-03-31 11:40:48 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-03-31 11:40:52 -0500
commit21eb043e7936364aa92ca1bfe8bddbd2754b77f5 (patch)
tree61daa5376279035c6b106dd2bc7c0ee0c566f5ab
parentc0e51347a12d89fbb000252b4a448fb2592fc489 (diff)
downloadipmi-fru-parser-21eb043e7936364aa92ca1bfe8bddbd2754b77f5.zip
ipmi-fru-parser-21eb043e7936364aa92ca1bfe8bddbd2754b77f5.tar.gz
writefrudata: Reuse ipmi bus for inventory-notify
Partially fixes openbmc/openbmc#875. Change-Id: Ieaaa65fa8432ffa873dcf2f4f96f9c1e09de3008 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--writefrudata.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/writefrudata.cpp b/writefrudata.cpp
index 8b59e9a..5c46f5f 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -445,7 +445,7 @@ auto getService(sdbusplus::bus::bus& bus,
// Takes FRU data, invokes Parser for each fru record area and updates
// Inventory
//------------------------------------------------------------------------
-int ipmi_update_inventory(fru_area_vec_t& area_vec)
+int ipmi_update_inventory(fru_area_vec_t& area_vec, sd_bus* bus_sd)
{
// Generic error reporter
int rc = 0;
@@ -474,7 +474,7 @@ int ipmi_update_inventory(fru_area_vec_t& area_vec)
// Here we are just printing the object,interface and the properties.
// which needs to be called with the new inventory manager implementation.
- auto bus = sdbusplus::bus::new_default();
+ sdbusplus::bus::bus bus{sd_bus_ref(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;
@@ -938,7 +938,7 @@ int ipmi_validate_fru_area(const uint8_t fruid, const char *fru_file_name,
#ifdef __IPMI_DEBUG__
printf("\n SIZE of vector is : [%d] \n",fru_area_vec.size());
#endif
- rc = ipmi_update_inventory(fru_area_vec);
+ rc = ipmi_update_inventory(fru_area_vec, bus_type);
if(rc <0)
{
fprintf(stderr, "Error updating inventory\n");
OpenPOWER on IntegriCloud