Skip to content

Commit 202185e

Browse files
ipa: rpi: controller: Ignore algorithms starting with disable
Prevent an algorithm starting with "disable" from being loaded. Signed-off-by: Peter Bailey <peter.bailey@raspberrypi.com>
1 parent da3491d commit 202185e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ipa/rpi/controller/controller.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ int Controller::read(char const *filename)
145145

146146
int Controller::createAlgorithm(const std::string &name, const YamlObject &params)
147147
{
148+
if (name.find("disable") == 0) {
149+
LOG(RPiController, Debug)
150+
<< "Algorithm \"" << name << "\" is disabled";
151+
return 0;
152+
}
153+
148154
auto it = getAlgorithms().find(name);
149155
if (it == getAlgorithms().end()) {
150156
LOG(RPiController, Warning)

0 commit comments

Comments
 (0)