]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man/sd_notify: fix indentation in sample programs 26146/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 22 Jan 2023 16:51:30 +0000 (17:51 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 22 Jan 2023 16:55:34 +0000 (17:55 +0100)
Whether we use a newline at the beginning of <programlisting> or not doesn't
seem to have any effect. So let's use the newline in multi-line examples; it is
easier to get the indentation right this way.

man/sd_notify.xml

index 0ba191c0cee8fc2c7d09f75c25bf3af8825a84ef..8ef1c507caceab86951007e08eef8f5f725ce117 100644 (file)
       <para>A service could send the following after completing
       initialization:</para>
 
-      <programlisting>sd_notifyf(0, "READY=1\n"
-        "STATUS=Processing requests…\n"
-        "MAINPID=%lu",
-        (unsigned long) getpid());</programlisting>
+      <programlisting>
+sd_notifyf(0, "READY=1\n"
+           "STATUS=Processing requests…\n"
+           "MAINPID=%lu",
+           (unsigned long) getpid());</programlisting>
     </example>
 
     <example>
 
       <para>A service could send the following shortly before exiting, on failure:</para>
 
-      <programlisting>sd_notifyf(0, "STATUS=Failed to start up: %s\n"
-        "ERRNO=%i",
-        strerror_r(errnum, (char[1024]){}, 1024),
-        errnum);</programlisting>
+      <programlisting>
+sd_notifyf(0, "STATUS=Failed to start up: %s\n"
+           "ERRNO=%i",
+           strerror_r(errnum, (char[1024]){}, 1024),
+           errnum);</programlisting>
     </example>
 
     <example>
       to synchronize against reception of all notifications sent before
       this call is made.</para>
 
-      <programlisting>sd_notify(0, "READY=1");
-      /* set timeout to 5 seconds */
-      sd_notify_barrier(0, 5 * 1000000);
+      <programlisting>
+sd_notify(0, "READY=1");
+/* set timeout to 5 seconds */
+sd_notify_barrier(0, 5 * 1000000);
       </programlisting>
     </example>
   </refsect1>