summaryrefslogtreecommitdiff
path: root/man/sd_id128_get_machine.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-05-26 16:07:55 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-26 21:44:15 +0200
commit6f7530929538b28cb41c289ad9cbced51848fc02 (patch)
treec5c8dadaa66409750bce7be1a83fbfe7f085728f /man/sd_id128_get_machine.xml
parent997c2d5625c99ece6049539e0809804ca67940d6 (diff)
downloadsystemd-6f7530929538b28cb41c289ad9cbced51848fc02.tar.gz
man: document that it is guaranteed that generated ID128 are never all-zero or all-one
This is the case because the ID128 we generate are all marked as v4 UUID which requires that some bits are zero and others are one. Let's document this so that people can rely on SD_ID128_NULL being a special value for "uninitialized" that is always distinguishable from generated UUIDs.
Diffstat (limited to 'man/sd_id128_get_machine.xml')
-rw-r--r--man/sd_id128_get_machine.xml16
1 files changed, 10 insertions, 6 deletions
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 2df4496f19..7fa9860898 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -99,12 +99,16 @@
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details. The
ID is cached internally. In future a different mechanism to determine the invocation ID may be added.</para>
- <para>Note that <function>sd_id128_get_machine_app_specific()</function>, <function>sd_id128_get_boot()</function>,
- <function>sd_id128_get_boot_app_specific()</function>, and <function>sd_id128_get_invocation()</function> always
- return UUID v4 compatible IDs. <function>sd_id128_get_machine()</function> will also return a UUID v4-compatible
- ID on new installations but might not on older. It is possible to convert the machine ID into a UUID v4-compatible
- one. For more information, see
- <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+ <para>Note that <function>sd_id128_get_machine_app_specific()</function>,
+ <function>sd_id128_get_boot()</function>, <function>sd_id128_get_boot_app_specific()</function>, and
+ <function>sd_id128_get_invocation()</function> always return UUID v4 compatible IDs.
+ <function>sd_id128_get_machine()</function> will also return a UUID v4-compatible ID on new installations
+ but might not on older. It is possible to convert the machine ID into a UUID v4-compatible one. For more
+ information, see
+ <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>. It is
+ hence guaranteed that thes functions will never return the ID consisting of all zero or all one bits
+ (<constant>SD_ID128_NULL</constant>, <constant>SD_ID128_ALLF</constant>) — with the possible exception of
+ <function>sd_id128_get_machine()</function>, as mentioned.</para>
<para>For more information about the <literal>sd_id128_t</literal>
type see