function prototype with unspecified argument is obsolete since c99.
additionally some of these function which don't take any argument were
being called with a `const char *` arg, which is UB.
fix both these issues by declararing ALL the components to accept a
`const char *`, and name the arg "unused" if it's meant to be ignored.
Exists on various ThinkPads. Seems to be both a synonym for "full".
Tested on:
- ThinkPad T500 (Spenser Truex <truex@equwal.com)
- ThinkPad T420 (drkhsh <me@drkhsh.at)
The current implementation uses the wrong type for
given sysctl calls leading to overflow and incorrectly
reported RAM usage. The fix is to use 'unsigned int'
which is what FreeBSD expects.
Starting with OpenBSD 6.7 regular users cannot access raw audio devices
anymore, for improved security.
Instead use the sioctl_open(3) API to access and manipulate audio
controls exposed by sndiod(8). On the first call a permanent connection
is established with the running sndiod daemon, and call-back functions
are registered which are triggered when audio controls are changed
(e.g., a USB headset is attached) or when the volume is modified. On
subsequent calls we poll for changes; if there are no volume changes
this costs virtually nothing.
Joint work with Alexandre Ratchov
On OpenBSD although the formula is correct due to integer division a
temperature of for example 54 celsius appears as 5. this patch first
treats it as a floating point op before retaining the non decimal digits
This drops a lot of code and even though we are using a common function,
the specification of only the needed things keeps it very efficient and
even more efficient in memory and time than the previous solution.
On OpenBSD the backlight percentage cannot be retrieved in a simple way.
The only two solutions we are aware of for now are:
- reading from /dev/ttyC0: which isn't possible without changing
permissions or running slstatus as root
- linking against xcb-xrandr: which is bloat and does not work in every
case appearently
This reverts commit 37724ac2c3 for now.