diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-07-27 08:24:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-08-02 15:45:24 +0200 |
commit | 787f78b6a106d34bbf52eabb02995733ea6a7d4d (patch) | |
tree | b23f4929a95d2c641526084e9330c933348ac2af /man/sd_id128_get_machine.xml | |
parent | 2c47fff6d2d9750ddf9e97fc45714aa8984b5eb6 (diff) | |
download | systemd-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.xml | 12 |
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 <systemd/sd-id128.h> -#include <stdio.h> - -#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, &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> |