* FreeBSD: catchup with the internal changes in code
* FreeBSD: use statvfs instead on statfs
Follow NetBSD here while here, catch up with code architecture changes
Previously, the fields in the wireless module were declared but not explicitly
initialized upon declaration. As nothing else would do so afterwards, this
could introduce random characters left over in the memory segment into
the fields. This was explicitly observed in the essid-field, but likely
a possibility for other fields as well. Hence, this commit adds explicit
initialization with zero bytes to all fields to ensure proper
termination of all fields.
Fixes#432
Fixes a stack-overflow when memory is, for example, "1020.17 TiB".
This fix limits the max number of memory decimals to 4.
The crash was probably introduced in 066e813331 .
* Add support for batteries outputting Time to empty on linux
The battery in the pinebook pro does not output the remaining charge
in Wh or mAh, so i3 cannot calculate the time remaining. However, it
does directly output the number of minutes remaining on in
POWER_SUPPLY_TIME_TO_EMPTY. This adds support for reading this field
and converting it to seconds_remaining.
* Add testcase for POWER_SUPPLY_TIME_TO_EMTY_NOW
This generates much friendlier names on all my systems, e.g.
"HDMI / DisplayPort 5" rather than
"Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] Digital Stereo (HDMI 5)"
1) Names incorporating Firmware/BIOS provided index numbers for on-board
devices (example: eno1)
2) Names incorporating Firmware/BIOS provided PCI Express hotplug slot
index numbers (example: ens1)
3) Names incorporating physical/geographical location of the connector
of the hardware (example: enp2s0)
4) Names incorporating the interfaces's MAC address
(example: enx78e7d1ea46da)
5) Classic, unpredictable kernel-native ethX naming
(example: eth0)
I've used usb/eth dongle with name enx..., and need only this one name,
but extend filter to include other ones as well.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Co-authored-by: Orestis Floros <orestisflo@gmail.com>