summaryrefslogtreecommitdiff
path: root/man/sd_id128_get_machine.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-07-27 08:24:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-08-02 15:45:24 +0200
commit787f78b6a106d34bbf52eabb02995733ea6a7d4d (patch)
treeb23f4929a95d2c641526084e9330c933348ac2af /man/sd_id128_get_machine.xml
parent2c47fff6d2d9750ddf9e97fc45714aa8984b5eb6 (diff)
downloadsystemd-787f78b6a106d34bbf52eabb02995733ea6a7d4d.tar.gz
man: move more examples to stand-alone files and use 2-space indentation consistenty
Moving them out makes it easier to run them through a compiler, use automatic indentation, and opens the possibility to provide a download link in the future. I verified that all examples compile cleanly. (2-space indentation is used because the examples are already significantly indented in the man page, and we need to keep them narrow so that they display well on standard terminals.)
Diffstat (limited to 'man/sd_id128_get_machine.xml')
-rw-r--r--man/sd_id128_get_machine.xml12
1 files changed, 1 insertions, 11 deletions
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 954fd2e6a7..9587aa7d66 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -120,17 +120,7 @@
<para>Here's a simple example for an application specific machine ID:</para>
- <programlisting>#include &lt;systemd/sd-id128.h&gt;
-#include &lt;stdio.h&gt;
-
-#define OUR_APPLICATION_ID SD_ID128_MAKE(c2,73,27,73,23,db,45,4e,a6,3b,b9,6e,79,b5,3e,97)
-
-int main(int argc, char *argv[]) {
- sd_id128_t id;
- sd_id128_get_machine_app_specific(OUR_APPLICATION_ID, &amp;id);
- printf("Our application ID: " SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id));
- return 0;
-}</programlisting>
+ <programlisting><xi:include href="id128-app-specific.c" parse="text" /></programlisting>
</example>
</refsect1>