Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions redfish-core/lib/fan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
namespace redfish
{
constexpr std::array<std::string_view, 1> fanInterface = {
"xyz.openbmc_project.Inventory.Item.Fan"};
"xyz.openbmc_project.Sensor.Value"};

inline void updateFanList(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
Expand Down Expand Up @@ -65,16 +65,13 @@ inline void updateFanList(

inline void getFanPaths(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& validChassisPath,
const std::string& /* validChassisPath */,
const std::function<void(const dbus::utility::MapperGetSubTreePathsResponse&
fanPaths)>& callback)
{
sdbusplus::message::object_path endpointPath{validChassisPath};
endpointPath /= "cooled_by";

dbus::utility::getAssociatedSubTreePaths(
endpointPath,
sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0,
dbus::utility::getSubTreePaths(
"/xyz/openbmc_project/sensors/fan_tach",
0,
fanInterface,
[asyncResp, callback](
const boost::system::error_code& ec,
Expand Down