]> git.ipfire.org Git - thirdparty/systemd.git/commit
sleep: introduce siphash24_compress_id128()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Nov 2022 17:49:19 +0000 (02:49 +0900)
committerLuca Boccassi <bluca@debian.org>
Fri, 27 Jan 2023 20:52:12 +0000 (20:52 +0000)
commita7795a4ecfe5c51fc837d0cb2f27d892c83df7a4
treebd0e6e722bb6585afc1f51ff0922df4f9d8d378e
parent3d9ca76f368b7b198be3471dd28ed32b35114ace
sleep: introduce siphash24_compress_id128()

Also, rename get_battery_identifier() to siphash24_compress_device_sysattr().

This also makes any errors in sd_id128_get_machine() or id128_get_product()
ignored. For the machine ID, the failure should not be significant unless
the file stored in the discharge level is reused by another system, which
is quite unusual. For the product ID, if the firmware provides useless
ID (all zero or all 0xFF), then loading/storing the discharge rate
becomes completely broken, that should be avoided.

Note, now sysattrs are used instead of properties in uevent files, but
both provide the same information, hence no functionality should be
changed.
src/shared/sleep-config.c