linux: Fix reading capacity_level with newer libgudev

System Internals / UPower - Bastien Nocera [hadess.net] - 5 September 2022 08:34 UTC

Newer development versions of libgudev now strip the linefeeds by themselves, so fix our naive linefeed-stripping which munched on the last character of the string if there was no linefeed.

Could not find a percentage for capacity level 'Ful'

See https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/26

6bfe66a linux: Fix reading capacity_level with newer libgudev
src/linux/up-device-supply.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share