[backlighthelper] Remove unreachable code from backlighthelper
AbandonedPublic

Authored by bshah on May 8 2017, 9:07 PM.

Details

Reviewers
broulik
Group Reviewers
Plasma
FreeBSD
Summary
  • It looks if we are on FreeBSD, then it sets the USE_SYSCTL
  • If USE_SYSCTL is set, it will try to use acpi_video interface to set

the brightness

  • However, this whole upower backend depends on libudev which is not

available on FreeBSD and it doesn't compile and link with FreeBSD

I propose to remove this code from here, and add it back when we split
out the backlighthelper from the upower backend

Test Plan

builds and works on Linux

Diff Detail

Repository
R122 Powerdevil
Branch
remove-unreachable-code
Lint
No Linters Available
Unit
No Unit Test Coverage
bshah created this revision.May 8 2017, 9:07 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 8 2017, 9:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
adridg added a subscriber: adridg.May 9 2017, 10:34 PM

It's a little more complicated than this:

  • FreeBSD has a port, libudev-devd, which provides the udev API on FreeBSD
    • I don't know how extensive the API is that that library provides, and whether the entire udev backend would work with it
  • In packaging, we remove the udev dependency as well as the bits that actually *need* on udev (powerdevilupowerbackend, udevqtclient, and udevqtdevice)

So this code is used, downstream, and I don't think it should be removed like this -- perhaps the udev-is-optional stuff should be merged from downstream instead, and/or the udev support on FreeBSD investigated to find out what it can do.

bshah abandoned this revision.May 26 2017, 3:25 PM

As discussed on IRC earlier, this code is actually used on FreeBSD ports with some more downstream patches.