sd-id128: return -ENOMEDIUM on null id
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 May 2018 11:55:12 +0000 (13:55 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 31 May 2018 11:04:18 +0000 (13:04 +0200)
commitea03f6ba0d66374594d716fc0e84e4d65906d2c3
treef427ed1d3912498055de1e6616f6b9b9d84f0945
parent63e2ebcdaa424e7ddf107312ed02edb176e2bb9f
sd-id128: return -ENOMEDIUM on null id

We currently return -ENOMEDIUM when /etc/machine-id is empty, and -EINVAL when
it is all zeros. But -EINVAL is also used for invalid args. The distinction
between empty and all-zero is not very important, let's use the same return
code.

Also document -ENOENT and -ENOMEDIUM since they can be a bit surprising.
man/sd_id128_get_machine.xml
src/libsystemd/sd-id128/sd-id128.c