Commit 09533c73 authored by Gleb Popov's avatar Gleb Popov 💬
Browse files

On FreeBSD do not try to execute powerdevil.backlighthelper.syspath action.

FreeBSD doesn't have sysfs, but it also isn't needed for backlight controls.
parent 453afffd
......@@ -175,6 +175,12 @@ void PowerDevilUPowerBackend::init()
m_brightnessMax = brightnessMaxJob->data()["brightnessmax"].toInt();
// FreeBSD doesn't have the sysfs interface that the bits below expect;
// the sysfs calls always fail, leading to brightnessSupportQueried(false) emission.
// Skip that command and carry on with the information that we do have.
Q_EMIT brightnessSupportQueried(m_brightnessMax > 0);
KAuth::Action syspathAction("org.kde.powerdevil.backlighthelper.syspath");
KAuth::ExecuteJob* syspathJob = syspathAction.execute();
......@@ -199,6 +205,7 @@ void PowerDevilUPowerBackend::init()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment