]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_id128_get_machine.xml
man: use same header for all files
[thirdparty/systemd.git] / man / sd_id128_get_machine.xml
index f797a8af4e23ee3eb3f28df743f02e989f10d562..59620ab77b3c3d345fae452ea84f7bb62ed82236 100644 (file)
@@ -1,10 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<!--
-  SPDX-License-Identifier: LGPL-2.1+
--->
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
 
 <refentry id="sd_id128_get_machine" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <function>sd_id128_get_machine()</function>,
     <function>sd_id128_get_machine_app_specific()</function>, and
     <function>sd_id128_get_boot_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>
+    <filename>/etc/machine-id</filename> is missing, and <constant>-ENOMEDIUM</constant> if
+    <filename>/etc/machine-id</filename> is empty or all zeros.</para>
   </refsect1>
 
   <xi:include href="libsystemd-pkgconfig.xml" />
     <example>
       <title>Application-specific machine ID</title>
 
-      <para>Here's a simple example for an application specific machine ID:</para>
+      <para>First, generate the application ID:</para>
+      <programlisting>$ systemd-id128 -p new
+As string:
+c273277323db454ea63bb96e79b53e97
+
+As UUID:
+c2732773-23db-454e-a63b-b96e79b53e97
+
+As man:sd-id128(3) macro:
+#define MESSAGE_XYZ SD_ID128_MAKE(c2,73,27,73,23,db,45,4e,a6,3b,b9,6e,79,b5,3e,97)
+...
+</programlisting>
+
+      <para>Then use the new identifier in an example application:</para>
 
       <programlisting><xi:include href="id128-app-specific.c" parse="text" /></programlisting>
     </example>