]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-id128: make sd_id128_get_machine() or friends return -EUCLEAN when an ID is in...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 14 Dec 2022 05:31:09 +0000 (14:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 14 Dec 2022 15:07:13 +0000 (00:07 +0900)
commite8a6625422db9d5598b6d640a9f4eec68921ce3d
tree8d1345a847a085a351df39362d485a07234d3792
parentbdc11d26d1ae151c6de91c75858a5775ed219879
sd-id128: make sd_id128_get_machine() or friends return -EUCLEAN when an ID is in an invalid format

EINVAL suggests that the caller passes an invalid argument. EIO is
for "input/output error", i.e. the error you'd get if the disk or
file system is borked, and this error code could be returned by the
underlying read/write functions.

Let's make the functions return an unambiguous error code.
man/sd_id128_get_machine.xml
src/libsystemd/sd-id128/id128-util.c
src/libsystemd/sd-id128/sd-id128.c
src/test/test-id128.c