summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/sd_id128_get_machine.xml8
-rw-r--r--src/libelogind/sd-id128/sd-id128.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 2694c186b..f3e151760 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -116,9 +116,11 @@
<refsect1>
<title>Return Value</title>
- <para>The two calls return 0 on success (in which case
- <parameter>ret</parameter> is filled in), or a negative
- errno-style error code.</para>
+ <para>Those calls return 0 on success (in which case <parameter>ret</parameter> is filled in),
+ or a negative errno-style error code. In particular, <function>sd_id128_get_machine()</function>
+ and <function>sd_id128_get_machine_app_specific()</function> return <constant>-ENOENT</constant>
+ if <filename>/etc/machine-id</filename> is missing, and <constant>-ENOMEDIUM</constant> if is
+ empty or all zeros.</para>
</refsect1>
<refsect1>
diff --git a/src/libelogind/sd-id128/sd-id128.c b/src/libelogind/sd-id128/sd-id128.c
index af2ff8353..80548fdfc 100644
--- a/src/libelogind/sd-id128/sd-id128.c
+++ b/src/libelogind/sd-id128/sd-id128.c
@@ -98,7 +98,7 @@ _public_ int sd_id128_get_machine(sd_id128_t *ret) {
return r;
if (sd_id128_is_null(saved_machine_id))
- return -EINVAL;
+ return -ENOMEDIUM;
}
*ret = saved_machine_id;