[systemd-commits] 4 commits - Makefile.am TODO man/sd-daemon.xml man/sd-id128.xml man/sd_id128_get_machine.xml man/sd_id128_randomize.xml man/sd_journal_open.xml man/sd_journal_print.xml man/sd_journal_seek_head.xml man/sd_listen_fds.xml man/sd_login_monitor_new.xml

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jul 13 14:10:46 PDT 2012


 Makefile.am                  |   58 ++++++++++++--
 TODO                         |    4 
 man/sd-daemon.xml            |    8 +
 man/sd-id128.xml             |    6 -
 man/sd_id128_get_machine.xml |  138 ++++++++++++++++++++++++++++++++++
 man/sd_id128_randomize.xml   |   55 +------------
 man/sd_journal_open.xml      |    6 +
 man/sd_journal_print.xml     |    1 
 man/sd_journal_seek_head.xml |  173 +++++++++++++++++++++++++++++++++++++++++++
 man/sd_listen_fds.xml        |    1 
 man/sd_login_monitor_new.xml |    1 
 11 files changed, 391 insertions(+), 60 deletions(-)

New commits:
commit 976c46f84f896782fa1e839904ab74cc4460c7b0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 23:10:23 2012 +0200

    man: add man page aliases for all macros/types too

diff --git a/Makefile.am b/Makefile.am
index 3dda9b8..a5cd5fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -551,8 +551,13 @@ MANPAGES_ALIAS = \
 	man/sd_journal_printv.3 \
 	man/sd_journal_send.3 \
 	man/sd_journal_sendv.3 \
+	man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
 	man/sd_journal_open_directory.3 \
 	man/sd_journal_close.3 \
+	man/sd_journal.3 \
+	man/SD_JOURNAL_RUNTIME_ONLY.3 \
+	man/SD_JOURNAL_SYSTEM_ONLY.3 \
+	man/SD_JOURNAL_LOCAL_ONLY.3 \
 	man/sd_journal_previous.3 \
 	man/sd_journal_next_skip.3 \
 	man/sd_journal_previous_skip.3 \
@@ -565,6 +570,9 @@ MANPAGES_ALIAS = \
 	man/sd_journal_get_cutoff_monotonic_usec.3 \
 	man/sd_journal_process.3 \
 	man/sd_journal_wait.3 \
+	man/SD_JOURNAL_NOP.3 \
+	man/SD_JOURNAL_APPEND.3 \
+	man/SD_JOURNAL_INVALIDATE.3 \
 	man/sd_journal_add_disjunction.3 \
 	man/sd_journal_flush_matches.3 \
 	man/sd_journal_seek_tail.3 \
@@ -609,8 +617,13 @@ man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
 man/sd_journal_printv.3: man/sd_journal_print.3
 man/sd_journal_send.3: man/sd_journal_print.3
 man/sd_journal_sendv.3: man/sd_journal_print.3
+man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
 man/sd_journal_open_directory.3: man/sd_journal_open.3
 man/sd_journal_close.3: man/sd_journal_open.3
+man/sd_journal.3: man/sd_journal_open.3
+man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
+man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
+man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
 man/sd_journal_previous.3: man/sd_journal_next.3
 man/sd_journal_next_skip.3: man/sd_journal_next.3
 man/sd_journal_previous_skip.3: man/sd_journal_next.3
@@ -623,6 +636,9 @@ man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
 man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
 man/sd_journal_process.3: man/sd_journal_get_fd.3
 man/sd_journal_wait.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
 man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
@@ -1479,13 +1495,31 @@ MANPAGES_ALIAS += \
 	man/sd_is_socket_unix.3 \
 	man/sd_is_socket_inet.3 \
 	man/sd_is_mq.3 \
-	man/sd_notifyf.3
+	man/sd_notifyf.3 \
+	man/SD_LISTEN_FDS_START.3 \
+	man/SD_EMERG.3 \
+	man/SD_ALERT.3 \
+	man/SD_CRIT.3 \
+	man/SD_ERR.3 \
+	man/SD_WARNING.3 \
+	man/SD_NOTICE.3 \
+	man/SD_INFO.3 \
+	man/SD_DEBUG.3
 
 man/sd_is_socket.3: man/sd_is_fifo.3
 man/sd_is_socket_unix.3: man/sd_is_fifo.3
 man/sd_is_socket_inet.3: man/sd_is_fifo.3
 man/sd_is_mq.3: man/sd_is_fifo.3
 man/sd_notifyf.3: man/sd_notify.3
+man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
+man/SD_EMERG.3: man/sd-daemon.3
+man/SD_ALERT.3: man/sd-daemon.3
+man/SD_CRIT.3: man/sd-daemon.3
+man/SD_ERR.3: man/sd-daemon.3
+man/SD_WARNING.3: man/sd-daemon.3
+man/SD_NOTICE.3: man/sd-daemon.3
+man/SD_INFO.3: man/sd-daemon.3
+man/SD_DEBUG.3: man/sd-daemon.3
 
 EXTRA_DIST += \
 	src/libsystemd-daemon/libsystemd-daemon.pc.in \
@@ -3179,6 +3213,7 @@ MANPAGES_ALIAS += \
 	man/sd_login_monitor_unref.3 \
 	man/sd_login_monitor_flush.3 \
 	man/sd_login_monitor_get_fd.3 \
+	man/sd_login_monitor.3 \
 	man/sd_session_get_uid.3 \
 	man/sd_session_get_seat.3 \
 	man/sd_session_get_service.3 \
@@ -3200,6 +3235,7 @@ man/systemd-logind.8: man/systemd-logind.service.8
 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
+man/sd_login_monitor.3: man/sd_login_monitor_new.3
 man/sd_session_get_uid.3: man/sd_session_is_active.3
 man/sd_session_get_seat.3: man/sd_session_is_active.3
 man/sd_session_get_service.3: man/sd_session_is_active.3
diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml
index e29e2fc..30a1b92 100644
--- a/man/sd-daemon.xml
+++ b/man/sd-daemon.xml
@@ -44,6 +44,14 @@
 
         <refnamediv>
                 <refname>sd-daemon</refname>
+                <refname>SD_EMERG</refname>
+                <refname>SD_ALERT</refname>
+                <refname>SD_CRIT</refname>
+                <refname>SD_ERR</refname>
+                <refname>SD_WARNING</refname>
+                <refname>SD_NOTICE</refname>
+                <refname>SD_INFO</refname>
+                <refname>SD_DEBUG</refname>
                 <refpurpose>Reference implementation of APIs for
                 new-style daemons</refpurpose>
         </refnamediv>
diff --git a/man/sd_journal_open.xml b/man/sd_journal_open.xml
index 5285fe6..ffd9a2c 100644
--- a/man/sd_journal_open.xml
+++ b/man/sd_journal_open.xml
@@ -46,6 +46,10 @@
                 <refname>sd_journal_open</refname>
                 <refname>sd_journal_open_directory</refname>
                 <refname>sd_journal_close</refname>
+                <refname>sd_journal</refname>
+                <refname>SD_JOURNAL_LOCAL_ONLY</refname>
+                <refname>SD_JOURNAL_RUNTIME_ONLY</refname>
+                <refname>SD_JOURNAL_SYSTEM_ONLY</refname>
                 <refpurpose>Open the system journal for reading</refpurpose>
         </refnamediv>
 
@@ -81,7 +85,7 @@
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 a <literal>sd_journal</literal> pointer, which on
-                success will contain journal context afterwards. The
+                success will contain journal context object afterwards. The
                 second argument is a flags field, which may consist of
                 the following flags ORed together:
                 <literal>SD_JOURNAL_LOCAL_ONLY</literal> makes sure
diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml
index 65694a2..05c1ebe 100644
--- a/man/sd_journal_print.xml
+++ b/man/sd_journal_print.xml
@@ -47,6 +47,7 @@
                 <refname>sd_journal_printv</refname>
                 <refname>sd_journal_send</refname>
                 <refname>sd_journal_sendv</refname>
+                <refname>SD_JOURNAL_SUPPRESS_LOCATION</refname>
                 <refpurpose>Submit log entries to the journal</refpurpose>
         </refnamediv>
 
diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml
index 003c1b5..5e90687 100644
--- a/man/sd_listen_fds.xml
+++ b/man/sd_listen_fds.xml
@@ -44,6 +44,7 @@
 
         <refnamediv>
                 <refname>sd_listen_fds</refname>
+                <refname>SD_LISTEN_FDS_START</refname>
                 <refpurpose>Check for file descriptors passed by the init system.</refpurpose>
         </refnamediv>
 
diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml
index 102d943..ce17159 100644
--- a/man/sd_login_monitor_new.xml
+++ b/man/sd_login_monitor_new.xml
@@ -47,6 +47,7 @@
                 <refname>sd_login_monitor_unref</refname>
                 <refname>sd_login_monitor_flush</refname>
                 <refname>sd_login_monitor_get_fd</refname>
+                <refname>sd_login_monitor</refname>
                 <refpurpose>Monitor login sessions, seats and users</refpurpose>
         </refnamediv>
 

commit a4023a43d0312568f0b81b39b4bc6fd9b64880eb
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 22:55:52 2012 +0200

    man: Split sd_randomize(3) from sd_id128_get_{machine,boot}(3)
    
    They have too little to do with each other...

diff --git a/Makefile.am b/Makefile.am
index 3dfe8a2..3dda9b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -498,6 +498,7 @@ MANPAGES = \
 	man/sd-id128.3 \
 	man/sd_id128_to_string.3 \
 	man/sd_id128_randomize.3 \
+	man/sd_id128_get_machine.3 \
 	man/sd-journal.3 \
 	man/sd_journal_print.3 \
 	man/sd_journal_stream_fd.3 \
@@ -604,8 +605,7 @@ man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
 man/sd_id128_equal.3: man/sd-id128.3
 man/sd_id128_from_string.3: man/sd_id128_to_string.3
-man/sd_id128_get_machine.3: man/sd_id128_randomize.3
-man/sd_id128_get_boot.3: man/sd_id128_randomize.3
+man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
 man/sd_journal_printv.3: man/sd_journal_print.3
 man/sd_journal_send.3: man/sd_journal_print.3
 man/sd_journal_sendv.3: man/sd_journal_print.3
diff --git a/man/sd-id128.xml b/man/sd-id128.xml
index d3f995e..d453390 100644
--- a/man/sd-id128.xml
+++ b/man/sd-id128.xml
@@ -78,8 +78,9 @@
                 </para>
 
                 <para>See
-                <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
-                <citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                <citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
+                <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 for more information about the implemented
                 functions.</para>
 
@@ -157,6 +158,7 @@
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
new file mode 100644
index 0000000..039c1dd
--- /dev/null
+++ b/man/sd_id128_get_machine.xml
@@ -0,0 +1,138 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2012 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_id128_get_machine">
+
+        <refentryinfo>
+                <title>sd_id128_get_machine</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart at poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>sd_id128_get_machine</refentrytitle>
+                <manvolnum>3</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>sd_id128_get_machine</refname>
+                <refname>sd_id128_get_boot</refname>
+                <refpurpose>Retrieve 128 bit IDs</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <funcsynopsis>
+                        <funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_id128_get_machine</function></funcdef>
+                                <paramdef>sd_id128_t* <parameter>ret</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_id128_get_boot</function></funcdef>
+                                <paramdef>sd_id128_t* <parameter>ret</parameter></paramdef>
+                        </funcprototype>
+
+                </funcsynopsis>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><function>sd_id128_get_machine()</function>
+                returns the machine ID of the executing host. This
+                reads and parses the
+                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                file. This function caches the machine ID internally
+                to make retrieving the machine ID a cheap
+                operation.</para>
+
+                <para><function>sd_id128_get_boot()</function> returns
+                the boot ID of the executing kernel. This reads and
+                parses the
+                <filename>/proc/sys/kernel/random/boot_id</filename>
+                file exposed by the kernel. It is randomly generated
+                early at boot and is unique for every running kernel
+                instance. See
+                <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
+                for more information. This function also internally
+                caches the returned ID to make this call a cheap
+                operation.</para>
+
+                <para>Note that
+                <function>sd_id128_get_boot()</function> always returns
+                a UUID v4 compatible
+                ID. <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 an UUID v4 compatible
+                one. For more information see
+                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+
+                <para>For more information about the
+                <literal>sd_id128_t</literal> type see
+                <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Return Value</title>
+
+                <para>The two calls return 0 on success (in which
+                case <parameter>ret</parameter> is filled in), or a
+                negative errno-style error code.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Notes</title>
+
+                <para>The <function>sd_id128_get_machine()</function>
+                and <function>sd_id128_get_boot()</function>
+                interfaces are available as shared library, which can
+                be compiled and linked to with the
+                <literal>libsystemd-id128</literal>
+                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                file.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/man/sd_id128_randomize.xml b/man/sd_id128_randomize.xml
index cb37419..be74937 100644
--- a/man/sd_id128_randomize.xml
+++ b/man/sd_id128_randomize.xml
@@ -44,9 +44,7 @@
 
         <refnamediv>
                 <refname>sd_id128_randomize</refname>
-                <refname>sd_id128_get_machine</refname>
-                <refname>sd_id128_get_boot</refname>
-                <refpurpose>Generate or retrieve 128 bit IDs</refpurpose>
+                <refpurpose>Generate 128 bit IDs</refpurpose>
         </refnamediv>
 
         <refsynopsisdiv>
@@ -58,16 +56,6 @@
                                 <paramdef>sd_id128_t* <parameter>ret</parameter></paramdef>
                         </funcprototype>
 
-                        <funcprototype>
-                                <funcdef>int <function>sd_id128_get_machine</function></funcdef>
-                                <paramdef>sd_id128_t* <parameter>ret</parameter></paramdef>
-                        </funcprototype>
-
-                        <funcprototype>
-                                <funcdef>int <function>sd_id128_get_boot</function></funcdef>
-                                <paramdef>sd_id128_t* <parameter>ret</parameter></paramdef>
-                        </funcprototype>
-
                 </funcsynopsis>
         </refsynopsisdiv>
 
@@ -81,36 +69,10 @@
                 <filename>/dev/urandom</filename> kernel random number
                 generator.</para>
 
-                <para><function>sd_id128_get_machine()</function>
-                returns the machine ID of the executing host. This
-                reads and parses the
-                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                file. This function caches the machine ID internally
-                to make retrieving the machine ID a cheap
-                operation.</para>
-
-                <para><function>sd_id128_get_boot()</function> returns
-                the boot ID of the executing kernel. This reads and
-                parses the
-                <filename>/proc/sys/kernel/random/boot_id</filename>
-                file exposed by the kernel. It is randomly generated
-                early at boot and is unique for every running kernel
-                instance. See
-                <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
-                for more information. This function also internally
-                caches the returned ID to make this call a cheap
-                operation.</para>
-
                 <para>Note that
-                <function>sd_id128_randomize()</function> and
-                <function>sd_id128_get_boot()</function> always return
+                <function>sd_id128_randomize()</function> always returns
                 a UUID v4 compatible
-                ID. <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 an UUID v4 compatible
-                one. For more information see
-                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+                ID.</para>
 
                 <para>For more information about the
                 <literal>sd_id128_t</literal> type see
@@ -125,7 +87,7 @@
         <refsect1>
                 <title>Return Value</title>
 
-                <para>The three calls return 0 on success (in which
+                <para>The call returns 0 on success (in which
                 case <parameter>ret</parameter> is filled in), or a
                 negative errno-style error code.</para>
         </refsect1>
@@ -133,10 +95,8 @@
         <refsect1>
                 <title>Notes</title>
 
-                <para>The <function>sd_id128_randomize()</function>,
-                <function>sd_id128_get_machine()</function> and
-                <function>sd_id128_get_boot()</function> interfaces
-                are available as shared library, which can be compiled
+                <para>The <function>sd_id128_randomize()</function> interface
+                is available as shared library, which can be compiled
                 and linked to with the
                 <literal>libsystemd-id128</literal>
                 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
@@ -150,7 +110,8 @@
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 </para>
         </refsect1>
 

commit 9a1d54166307bbe51b33018a93e77688311eab14
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 22:47:46 2012 +0200

    build-sys: don't install sd-readahead.h as include file, but as documentation
    
    sd-readahead.h is supposed to be a drop-in API, nothing people should
    ever link to or could make use without also adding sd-readahead.c to
    their sources. Hence, don't install this header file into INCLUDES, but
    instead install it as DOCS.

diff --git a/Makefile.am b/Makefile.am
index 8e91e49..3dfe8a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2577,7 +2577,8 @@ systemd_readahead_LDADD = \
 	libsystemd-daemon.la \
 	libudev.la
 
-pkginclude_HEADERS += \
+dist_doc_DATA += \
+	src/readahead/sd-readahead.c \
 	src/systemd/sd-readahead.h
 
 rootlibexec_PROGRAMS += \
diff --git a/TODO b/TODO
index 333db58..3bf6ef8 100644
--- a/TODO
+++ b/TODO
@@ -75,8 +75,6 @@ Features:
 
 * Document:
         - PID 1 D-Bus API
-        - Journal C API manual pages
-        - scheduled shutdown API
 
 * introduce Type=pid-file
 
@@ -245,8 +243,6 @@ Features:
 
 * write RPM spec macros for presets
 
-* journal: write man pages for API
-
 * journal: extend hash tables as we go
 
 * journal: API for looking for retrieving "all values of this field"

commit 639a6a2529dd5a3109b998ccb44fb75b97525e13
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 22:39:02 2012 +0200

    man: document sd_journal_seek_head()

diff --git a/Makefile.am b/Makefile.am
index b9353f0..8e91e49 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -508,7 +508,8 @@ MANPAGES = \
 	man/sd_journal_get_cutoff_realtime_usec.3 \
 	man/sd_journal_get_cursor.3 \
 	man/sd_journal_get_fd.3 \
-	man/sd_journal_add_match.3
+	man/sd_journal_add_match.3 \
+	man/sd_journal_seek_head.3
 
 MANPAGES_ALIAS = \
 	man/reboot.8 \
@@ -564,7 +565,11 @@ MANPAGES_ALIAS = \
 	man/sd_journal_process.3 \
 	man/sd_journal_wait.3 \
 	man/sd_journal_add_disjunction.3 \
-	man/sd_journal_flush_matches.3
+	man/sd_journal_flush_matches.3 \
+	man/sd_journal_seek_tail.3 \
+	man/sd_journal_seek_monotonic_usec.3 \
+	man/sd_journal_seek_realtime_usec.3 \
+	man/sd_journal_seek_cursor.3
 
 man/reboot.8: man/halt.8
 man/poweroff.8: man/halt.8
@@ -620,6 +625,10 @@ man/sd_journal_process.3: man/sd_journal_get_fd.3
 man/sd_journal_wait.3: man/sd_journal_get_fd.3
 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
+man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
 
 XML_FILES = \
 	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
diff --git a/man/sd_journal_seek_head.xml b/man/sd_journal_seek_head.xml
new file mode 100644
index 0000000..b6a9a73
--- /dev/null
+++ b/man/sd_journal_seek_head.xml
@@ -0,0 +1,173 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2012 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_journal_seek_head">
+
+        <refentryinfo>
+                <title>sd_journal_seek_head</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart at poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>sd_journal_seek_head</refentrytitle>
+                <manvolnum>3</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>sd_journal_seek_head</refname>
+                <refname>sd_journal_seek_tail</refname>
+                <refname>sd_journal_seek_monotonic_usec</refname>
+                <refname>sd_journal_seek_realtime_usec</refname>
+                <refname>sd_journal_seek_cursor</refname>
+                <refpurpose>Seek to a position in the
+                journal</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <funcsynopsis>
+                        <funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_journal_seek_head</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_journal_seek_tail</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_journal_seek_monotonic_usec</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                                <paramdef>sd_id128_t <parameter>boot_id</parameter></paramdef>
+                                <paramdef>uint64_t <parameter>usec</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_journal_seek_realtime_usec</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                                <paramdef>uint64_t <parameter>usec</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_journal_seek_cursor</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                                <paramdef>const char * <parameter>cursor</parameter></paramdef>
+                        </funcprototype>
+                </funcsynopsis>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><function>sd_journal_seek_head()</function>
+                seeks to the beginning of the journal, i.e. the oldest
+                avilable entry.</para>
+
+                <para>Similar,
+                <function>sd_journal_seek_tail()</function> may be
+                used to seek to the end of the journal, i.e. the most
+                recent available entry.</para>
+
+                <para><function>sd_journal_seek_monotonic_usec()</function>
+                seeks to the entry with the specified monotonic
+                timestamp, i.e. CLOCK_MONOOTONIC. Since monotonic time
+                restarts on every reboot a boot ID needs to be
+                specified as well.</para>
+
+                <para><function>sd_journal_seek_realtime_usec()</function>
+                seeks to the entry with the specified realtime
+                (wallclock) timestamp, i.e. CLOCK_REALTIME. Note that
+                the realtime clock is not necessary monotonic. If a
+                realtime timestamp is ambiguous it is not defined
+                which position is seeked to.</para>
+
+                <para><function>sd_journal_seek_cursor()</function>
+                seeks to the entry located at the specified cursor
+                string. For details on cursors see
+                <citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+                <para>Note that these calls do not actually make any
+                entry the new current entry, this needs to be done in
+                a separate step with a subsequent
+                <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                invocation (or a similar call). Only then entry data
+                may be retrieved via
+                <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
+                no entry exists that matches exactly the specified
+                seek address the next closest is seeked to. If
+                <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                is used the closest following entry will be seeked to,
+                if
+                <citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                is used the closest preceeding entry is seeked
+                to.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Return Value</title>
+
+                <para>The functions return 0 on success or a negative
+                errno-style error code.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Notes</title>
+
+                <para>The <function>sd_journal_seek_head()</function>,
+                <function>sd_journal_seek_tail()</function>,
+                <function>sd_journal_seek_monotonic_usec()</function>,
+                <function>sd_journal_seek_realtime_usec()</function>,
+                and <function>sd_journal_seek_cursor()</function>
+                interfaces are available as shared library, which can
+                be compiled and linked to with the
+                <literal>libsystemd-journal</literal>
+                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                file.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>



More information about the systemd-commits mailing list