oem-ibm: Change the "Notify" method to new "NotifyDump" method
The "NotifyDump" method was newly introduced in the PDI with
additional parameters [1]. This commit changes the Notify
method to the new "NotifyDump" method.
[1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/com/ibm/Dump/Notify.interface.yaml
Change-Id: Id37cda0eaf3ecb7bc0ad823f659a993376a4edb0
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_dump.cpp b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
index e936acb..fc14f2c 100644
--- a/oem/ibm/libpldmresponder/file_io_type_dump.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
@@ -9,9 +9,9 @@
#include <systemd/sd-bus.h>
#include <unistd.h>
+#include <com/ibm/Dump/Notify/server.hpp>
#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/server.hpp>
-#include <xyz/openbmc_project/Dump/NewDump/server.hpp>
#include <cstdint>
#include <exception>
@@ -110,24 +110,28 @@
int DumpHandler::newFileAvailable(uint64_t length)
{
- static constexpr auto dumpInterface = "xyz.openbmc_project.Dump.NewDump";
+ static constexpr auto dumpInterface = "com.ibm.Dump.Notify";
auto& bus = pldm::utils::DBusHandler::getBus();
auto notifyObjPath = dumpObjPath;
+ auto notifyDumpType =
+ sdbusplus::common::com::ibm::dump::Notify::DumpType::System;
+
if (dumpType == PLDM_FILE_TYPE_RESOURCE_DUMP)
{
// Setting the Notify path for resource dump
notifyObjPath = resDumpObjPath;
+ notifyDumpType =
+ sdbusplus::common::com::ibm::dump::Notify::DumpType::Resource;
}
try
{
auto service =
pldm::utils::DBusHandler().getService(notifyObjPath, dumpInterface);
- using namespace sdbusplus::xyz::openbmc_project::Dump::server;
auto method = bus.new_method_call(service.c_str(), notifyObjPath,
- dumpInterface, "Notify");
- method.append(fileHandle, length);
+ dumpInterface, "NotifyDump");
+ method.append(fileHandle, length, notifyDumpType, 0);
bus.call_noreply(method, dbusTimeout);
}
catch (const std::exception& e)