Skip to content

Commit

Permalink
Modify gpio and sysfs path check in config validation.
Browse files Browse the repository at this point in the history
Summary: The check would fail when one of them exist.

Reviewed By: rationalis

Differential Revision: D62767884

fbshipit-source-id: 5889c854ecef9237526c4bc5c4be8e8c85d03144
  • Loading branch information
Justin Kim authored and facebook-github-bot committed Sep 16, 2024
1 parent 88d75b9 commit 87e5809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fboss/platform/fan_service/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bool Utils::isValidConfig(const FanServiceConfig& config) {
XLOG(ERR) << "ledSysfsPath cannot be empty";
return false;
}
if ((!fan.presenceSysfsPath()) != (!fan.presenceGpio())) {
if ((!fan.presenceSysfsPath()) && (!fan.presenceGpio())) {
XLOG(ERR) << "either presenceSysfsPath or presenceGpio must be set";
return false;
}
Expand Down

0 comments on commit 87e5809

Please sign in to comment.