chiark / gitweb /
Prep 229.9: Make all supportable API functions visible.
authorSven Eden <yamakuzure@gmx.net>
Tue, 12 Dec 2017 06:54:16 +0000 (07:54 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 12 Dec 2017 06:54:16 +0000 (07:54 +0100)
The process of cleaning up elogind, meaning to mask all bits that are
unneeded by elogind, has been finished a while ago.

It is therefore time to re-enable all previously masked API functions
that elogind can support. This will make it easier for future
developers to integrate elogind into their software where they
already support systemd-login.

24 files changed:
man/glib-event-glue.c [new file with mode: 0644]
man/sd_bus_message_append_string_memfd.xml [new file with mode: 0644]
man/sd_bus_message_get_cookie.xml [new file with mode: 0644]
man/sd_bus_message_get_monotonic_usec.xml [new file with mode: 0644]
man/sd_bus_path_encode.xml [new file with mode: 0644]
man/sd_event_get_fd.xml [new file with mode: 0644]
src/basic/memfd-util.c
src/basic/memfd-util.h
src/basic/siphash24.c
src/basic/socket-util.h
src/libelogind/libelogind.sym
src/libelogind/sd-bus/bus-control.c
src/libelogind/sd-bus/bus-convenience.c
src/libelogind/sd-bus/bus-creds.c
src/libelogind/sd-bus/bus-message.c
src/libelogind/sd-bus/bus-objects.c
src/libelogind/sd-bus/bus-slot.c
src/libelogind/sd-bus/bus-track.c
src/libelogind/sd-bus/sd-bus.c
src/libelogind/sd-daemon/sd-daemon.c
src/libelogind/sd-event/sd-event.c
src/systemd/sd-bus.h
src/systemd/sd-daemon.h
src/systemd/sd-event.h

diff --git a/man/glib-event-glue.c b/man/glib-event-glue.c
new file mode 100644 (file)
index 0000000..8f3168d
--- /dev/null
@@ -0,0 +1,68 @@
+/***
+  Copyright 2014 Tom Gundersen
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#include <stdlib.h>
+
+typedef struct SDEventSource {
+        GSource source;
+        GPollFD pollfd;
+        sd_event *event;
+} SDEventSource;
+
+static gboolean event_prepare(GSource *source, gint *timeout_) {
+        return sd_event_prepare(((SDEventSource *)source)->event) > 0;
+}
+
+static gboolean event_check(GSource *source) {
+        return sd_event_wait(((SDEventSource *)source)->event, 0) > 0;
+}
+
+static gboolean event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) {
+        return sd_event_dispatch(((SDEventSource *)source)->event) > 0;
+}
+
+static void event_finalize(GSource *source) {
+        sd_event_unref(((SDEventSource *)source)->event);
+}
+
+static GSourceFuncs event_funcs = {
+        .prepare = event_prepare,
+        .check = event_check,
+        .dispatch = event_dispatch,
+        .finalize = event_finalize,
+};
+
+GSource *g_sd_event_create_source(sd_event *event) {
+        SDEventSource *source;
+
+        source = (SDEventSource *)g_source_new(&event_funcs, sizeof(SDEventSource));
+
+        source->event = sd_event_ref(event);
+        source->pollfd.fd = sd_event_get_fd(event);
+        source->pollfd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+
+        g_source_add_poll((GSource *)source, &source->pollfd);
+
+        return (GSource *)source;
+}
diff --git a/man/sd_bus_message_append_string_memfd.xml b/man/sd_bus_message_append_string_memfd.xml
new file mode 100644 (file)
index 0000000..08f1fd0
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!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 elogind.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  elogind 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.
+
+  elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_append_string_memfd"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_bus_message_append_string_memfd</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>A monkey with a typewriter</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_append_string_memfd</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_append_string_memfd</refname>
+    <refname>sd_bus_message_append_string_iovec</refname>
+    <refname>sd_bus_message_append_string_space</refname>
+
+    <refpurpose>Attach a string to a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_memfd</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>int <parameter>memfd</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_iovec</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>const struct iovec *<parameter>iov</parameter></paramdef>
+        <paramdef>unsigned <parameter>n</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_space</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>size_t <parameter>size</parameter></paramdef>
+        <paramdef>char **<parameter>s</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>The functions
+    <function>sd_bus_message_append_string_memfd</function> and
+    <function>sd_bus_message_append_string_iovec</function> can be
+    used to append a single string (item of type <literal>s</literal>)
+    to message <parameter>m</parameter>.</para>
+
+    <para>In case of
+    <function>sd_bus_message_append_string_memfd</function>, the
+    contents of <parameter>memfd</parameter> are the string. They must
+    satisfy the same constraints as described for the
+    <literal>s</literal> type in
+    <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>In case of
+    <function>sd_bus_message_append_string_iovec</function>, the
+    payload of <parameter>iov</parameter> is the string. It must
+    satisfy the same constraints as described for the
+    <literal>s</literal> type in
+    <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>The <parameter>iov</parameter> argument must point to
+    <parameter>n</parameter> <structname>struct iovec</structname>
+    structures. Each structure may have the
+    <structname>iov_base</structname> field set, in which case the
+    memory pointed to will be copied into the message, or unset, in
+    which case a block of spaces (ASCII 32) of length
+    <structname>iov_len</structname> will be inserted. The
+    memory pointed at by <parameter>iov</parameter> may be changed
+    after this call.</para>
+
+    <para>The
+    <function>sd_bus_message_append_string_space</function> function appends
+    space for a string to message <parameter>m</parameter>. It behaves
+    similar to <function>sd_bus_message_append_basic</function> with
+    type <literal>s</literal>, but instead of copying a string into
+    the message, it returns a pointer to the destination area to
+    the caller in pointer <parameter>p</parameter>. Space for the string
+    of length <parameter>size</parameter> plus the terminating
+    <constant>NUL</constant> is allocated.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, those calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</para>
+  </refsect1>
+
+  <xi:include href="sd_bus_message_append_basic.xml" xpointer="errors" />
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html">The D-Bus specification</ulink>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_bus_message_get_cookie.xml b/man/sd_bus_message_get_cookie.xml
new file mode 100644 (file)
index 0000000..7994d72
--- /dev/null
@@ -0,0 +1,146 @@
+<?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 elogind.
+
+  Copyright 2013 Lennart Poettering
+
+  elogind 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.
+
+  elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_get_cookie">
+
+  <refentryinfo>
+    <title>sd_bus_message_get_cookie</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Lennart</firstname>
+        <surname>Poettering</surname>
+        <email>lennart@poettering.net</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_get_cookie</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_get_cookie</refname>
+    <refname>sd_bus_message_get_reply_cookie</refname>
+    <refpurpose>Returns the transaction cookie of a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_cookie</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_reply_cookie</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_message_get_cookie()</function> returns the
+    transaction cookie of a message. The cookie uniquely identifies a
+    message within each bus peer, but is not globally unique. It is
+    assigned when a message is sent.</para>
+
+    <para><function>sd_bus_message_get_reply_cookie()</function>
+    returns the transaction cookie of the message the specified
+    message is a response to. When a reply message is generated for a
+    method call message, its cookie is copied over into this field.
+    Note that while every message that is transferred is identified by
+    a cookie, only response messages carry a reply cookie
+    field.</para>
+
+    <para>Both functions take a message object as first parameter and
+    a place to store the 64-bit cookie in.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these calls return 0 or a positive integer. On
+    failure, these calls return a negative errno-style error
+    code.</para>
+
+    <para>On success, the cookie/reply cookie is returned in the
+    specified 64-bit unsigned integer variable.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>A specified parameter
+        is invalid.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ENODATA</constant></term>
+
+        <listitem><para>No cookie has been assigned to this message.
+        This either indicates that the message has not been sent yet
+        and hence has no cookie assigned, or that the message is not a
+        method response message and hence carries a reply cookie
+        field.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The <function>sd_bus_message_get_cookie()</function> and
+    <function>sd_bus_message_get_reply_cookie()</function> interfaces
+    are available as a shared library, which can be compiled and
+    linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/man/sd_bus_message_get_monotonic_usec.xml
new file mode 100644 (file)
index 0000000..4fb5025
--- /dev/null
@@ -0,0 +1,181 @@
+<?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 elogind.
+
+  Copyright 2013 Lennart Poettering
+
+  elogind 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.
+
+  elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_get_monotonic_usec">
+
+  <refentryinfo>
+    <title>sd_bus_message_get_monotonic_usec</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Lennart</firstname>
+        <surname>Poettering</surname>
+        <email>lennart@poettering.net</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_get_monotonic_usec</refname>
+    <refname>sd_bus_message_get_realtime_usec</refname>
+    <refname>sd_bus_message_get_seqnum</refname>
+    <refpurpose>Retrieve the sender timestamps and sequence number of a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_monotonic_usec</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>usec</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_realtime_usec</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>usec</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_seqnum</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>seqnum</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_message_get_monotonic_usec()</function>
+    returns the monotonic timestamp of the time the message was sent.
+    This value is in microseconds since the
+    <constant>CLOCK_MONOTONIC</constant> epoch, see
+    <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    for details.</para>
+
+    <para>Similarly,
+    <function>sd_bus_message_get_realtime_usec()</function> returns
+    the realtime (wallclock) timestamp of the time the message was
+    sent. This value is in microseconds since Jan 1st, 1970, i.e. in
+    the <constant>CLOCK_REALTIME</constant> clock.</para>
+
+    <para><function>sd_bus_message_get_seqnum()</function> returns the
+    kernel-assigned sequence number of the message. The kernel assigns
+    a global, monotonically increasing sequence number to all messages
+    transmitted on the local system, at the time the message was sent.
+    This sequence number is useful for determining message send order,
+    even across different buses of the local system. The sequence
+    number combined with the boot ID of the system (as returned by
+    <citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
+    is a suitable globally unique identifier for bus messages.</para>
+
+    <para>Note that the sending order and receiving order of messages
+    might differ, in particular for broadcast messages. This means
+    that the sequence number and the timestamps of messages a client
+    reads are not necessarily monotonically increasing.</para>
+
+    <para>These timestamps and the sequence number are attached to
+    each message by the kernel and cannot be manipulated by the
+    sender.</para>
+
+    <para>Note that these timestamps are only available on some bus
+    transports, and only after support for them has been negotiated
+    with the
+    <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    call.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these calls return 0 or a positive integer. On
+    failure, these calls return a negative errno-style error
+    code.</para>
+
+    <para>On success, the timestamp or sequence number is returned in
+    the specified 64-bit unsigned integer variable.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>A specified parameter is
+        invalid.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ENODATA</constant></term>
+
+        <listitem><para>No timestamp or sequence number information is
+        attached to the passed message. This error is returned if the
+        underlying transport does not support timestamping or
+        assigning of sequence numbers, or if this feature has not been
+        negotiated with
+        <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The
+    <function>sd_bus_message_get_monotonic_usec()</function>,
+    <function>sd_bus_message_get_realtime_usec()</function>, and
+    <function>sd_bus_message_get_seqnum()</function> interfaces are
+    available as a shared library, which can be compiled and linked to
+    with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml
new file mode 100644 (file)
index 0000000..3fbb37c
--- /dev/null
@@ -0,0 +1,188 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!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 elogind.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  elogind 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.
+
+  elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_path_encode">
+
+  <refentryinfo>
+    <title>sd_bus_path_encode</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>A monkey with a typewriter</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_path_encode</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_path_encode</refname>
+    <refname>sd_bus_path_encode_many</refname>
+    <refname>sd_bus_path_decode</refname>
+    <refname>sd_bus_path_decode_many</refname>
+
+    <refpurpose>Convert an external identifier into an object path and back</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_encode</function></funcdef>
+        <paramdef>const char *<parameter>prefix</parameter></paramdef>
+        <paramdef>const char *<parameter>external_id</parameter></paramdef>
+        <paramdef>char **<parameter>ret_path</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_encode_many</function></funcdef>
+        <paramdef>char **<parameter>out</parameter></paramdef>
+        <paramdef>const char *<parameter>path_template</parameter></paramdef>
+        <paramdef>...</paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_decode</function></funcdef>
+        <paramdef>const char *<parameter>path</parameter></paramdef>
+        <paramdef>const char *<parameter>prefix</parameter></paramdef>
+        <paramdef>char **<parameter>ret_external_id</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_decode_many</function></funcdef>
+        <paramdef>const char *<parameter>path</parameter></paramdef>
+        <paramdef>const char *<parameter>path_template</parameter></paramdef>
+        <paramdef>...</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_path_encode()</function> and
+    <function>sd_bus_path_decode()</function> convert external
+    identifier strings into object paths and back. These functions are
+    useful to map application-specific string identifiers of any kind
+    into bus object paths in a simple, reversible and safe way.</para>
+
+    <para><function>sd_bus_path_encode()</function> takes a bus path
+    prefix and an external identifier string as arguments, plus a
+    place to store the returned bus path string. The bus path prefix
+    must be a valid bus path, starting with a slash
+    <literal>/</literal>, and not ending in one. The external
+    identifier string may be in any format, may be the empty string,
+    and has no restrictions on the charset — however, it must
+    always be <constant>NUL</constant>-terminated. The returned string
+    will be the concatenation of the bus path prefix plus an escaped
+    version of the external identifier string. This operation may be
+    reversed with <function>sd_bus_decode()</function>. It is
+    recommended to only use external identifiers that generally
+    require little escaping to be turned into valid bus path
+    identifiers (for example, by sticking to a 7-bit ASCII character
+    set), in order to ensure the resulting bus path is still short and
+    easily processed.</para>
+
+    <para><function>sd_bus_path_decode()</function> reverses the
+    operation of <function>sd_bus_path_encode()</function> and thus
+    regenerates an external identifier string from a bus path. It
+    takes a bus path and a prefix string, plus a place to store the
+    returned external identifier string. If the bus path does not
+    start with the specified prefix, 0 is returned and the returned
+    string is set to <constant>NULL</constant>. Otherwise, the
+    string following the prefix is unescaped and returned in the
+    external identifier string.</para>
+
+    <para>The escaping used will replace all characters which are
+    invalid in a bus object path by <literal>_</literal>, followed by a
+    hexadecimal value. As a special case, the empty string will be
+    replaced by a lone <literal>_</literal>.</para>
+
+    <para><function>sd_bus_path_encode_many()</function> works like
+    its counterpart <function>sd_bus_path_encode()</function>, but
+    takes a path template as argument and encodes multiple labels
+    according to its embedded directives. For each
+    <literal>%</literal> character found in the template, the caller
+    must provide a string via varargs, which will be encoded and
+    embedded at the position of the <literal>%</literal> character.
+    Any other character in the template is copied verbatim into the
+    encoded path.</para>
+
+    <para><function>sd_bus_path_decode_many()</function> does the
+    reverse of <function>sd_bus_path_encode_many()</function>. It
+    decodes the passed object path according to the given
+    path template. For each <literal>%</literal> character in the
+    template, the caller must provide an output storage
+    (<literal>char **</literal>) via varargs. The decoded label
+    will be stored there. Each <literal>%</literal> character will
+    only match the current label. It will never match across labels.
+    Furthermore, only a single directive is allowed per label.
+    If <literal>NULL</literal> is passed as output storage, the
+    label is verified but not returned to the caller.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_bus_path_encode()</function>
+    returns positive or 0, and a valid bus path in the return
+    argument. On success, <function>sd_bus_path_decode()</function>
+    returns a positive value if the prefixed matched, or 0 if it
+    did not. If the prefix matched, the external identifier is returned
+    in the return parameter. If it did not match, NULL is returned in
+    the return parameter. On failure, a negative errno-style error
+    number is returned by either function. The returned strings must
+    be
+    <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>'d
+    by the caller.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para><function>sd_bus_path_encode()</function> and
+    <function>sd_bus_path_decode()</function> are available as a
+    shared library, which can be compiled and linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
new file mode 100644 (file)
index 0000000..88671a2
--- /dev/null
@@ -0,0 +1,140 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!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 elogind.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  elogind 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.
+
+  elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_event_get_fd" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_event_get_fd</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_get_fd</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_get_fd</refname>
+
+    <refpurpose>Obtain a file descriptor to poll for event loop events</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_get_fd</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_get_fd()</function> returns the file
+    descriptor that an event loop object returned by the
+    <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    function uses to wait for events. This file descriptor may itself
+    be polled for
+    <constant>POLLIN</constant>/<constant>EPOLLIN</constant>
+    events. This makes it possible to embed an
+    <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    event loop into another, possibly foreign, event loop.</para>
+
+    <para>The returned file descriptor refers to an <citerefentry
+    project='man-pages'><refentrytitle>epoll</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    object. It is recommended not to alter it by invoking
+    <citerefentry
+    project='man-pages'><refentrytitle>epoll_ctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    on it, in order to avoid interference with the event loop's inner
+    logic and assumptions.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_event_get_fd()</function> returns a
+    non-negative file descriptor. On failure, it returns a negative
+    errno-style error code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para><parameter>event</parameter> is not a valid
+        pointer to an <structname>sd_event</structname> structure.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+
+    <example>
+      <title>Integration in the GLib event loop</title>
+
+      <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting>
+    </example>
+  </refsect1>
+
+  <xi:include href="libelogind-pkgconfig.xml" />
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>epoll_ctl</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>epoll</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index ad80d5662d110271e0ad412e88fb5fa13eae5419..231c2de711ccce3abde72f477dc1d5f33ea5b6fd 100644 (file)
@@ -123,6 +123,7 @@ int memfd_get_sealed(int fd) {
 
         return r == (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE | F_SEAL_SEAL);
 }
+#endif // 0
 
 int memfd_get_size(int fd, uint64_t *sz) {
         struct stat stat;
@@ -138,7 +139,6 @@ int memfd_get_size(int fd, uint64_t *sz) {
         *sz = stat.st_size;
         return 0;
 }
-#endif // 0
 
 int memfd_set_size(int fd, uint64_t sz) {
         int r;
index 6b828520e8258a0d771e875cf16e3ca3731dd811..781d1a431bdc1576a8c10c4a8880836a02ebf5bc 100644 (file)
@@ -34,7 +34,7 @@ int memfd_map(int fd, uint64_t offset, size_t size, void **p);
 int memfd_set_sealed(int fd);
 #if 0 /// UNNEEDED by elogind
 int memfd_get_sealed(int fd);
+#endif // 0
 
 int memfd_get_size(int fd, uint64_t *sz);
-#endif // 0
 int memfd_set_size(int fd, uint64_t sz);
index 4bb41786c8b2a27b224ca9b9a0a682bde50e6fb8..e8b18dd16cd620a927e86b60c65ad832f40278aa 100644 (file)
@@ -68,6 +68,12 @@ void siphash24_init(struct siphash *state, const uint8_t k[16]) {
         };
 }
 
+#if 1 /// let's add a diagnostic push to silence -Wimplicit-fallthrough to elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic push
+#    pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#  endif // __GNUC__
+#endif // 1
 void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
 
         const uint8_t *in = _in;
@@ -150,6 +156,11 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
                         break;
         }
 }
+#if 1 /// end diagnostic push in elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic pop
+#  endif // __GNUC__
+#endif // 1
 
 uint64_t siphash24_finalize(struct siphash *state) {
         uint64_t b;
index a85045d11cf4bb862106910317d82d7efd28573a..91aa2f5297818f9a6e9c27e9bf0954d049c49227 100644 (file)
 
 union sockaddr_union {
         struct sockaddr sa;
-#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
         struct sockaddr_in in;
         struct sockaddr_in6 in6;
-#endif // 0
         struct sockaddr_un un;
-#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
+#if 0 /// UNNEEDED by elogind.
         struct sockaddr_nl nl;
         struct sockaddr_storage storage;
         struct sockaddr_ll ll;
index b0132fca2919553b03004a973029c1764a121a35..79c219afb149470fc788b055c5e096a98c3e1f9d 100644 (file)
@@ -65,15 +65,15 @@ global:
 
         /* sd-daemon */
         sd_booted;
-        /* sd_is_fifo; */
+        sd_is_fifo;
         /* sd_is_mq; */
         sd_is_socket;
-        /* sd_is_socket_inet; */
-        /* sd_is_socket_unix; */
-        /* sd_is_special; */
+        sd_is_socket_inet;
+        sd_is_socket_unix;
+        sd_is_special;
         /* sd_listen_fds; */
         sd_notify;
-        /* sd_notifyf; */
+        sd_notifyf;
         sd_watchdog_enabled;
 
         /* sd-id128 */
@@ -142,19 +142,16 @@ global:
         sd_uid_get_display;
 } LIBSYSTEMD_211;
 
-/*
- * These methods are not needed by elogind.
- * LIBSYSTEMD_214 {
- * global:
- *         sd_pid_notify;
- *         sd_pid_notifyf;
- * } LIBSYSTEMD_213;
- */
+LIBSYSTEMD_214 {
+global:
+        sd_pid_notify;
+        sd_pid_notifyf;
+} LIBSYSTEMD_213;
 
 LIBSYSTEMD_216 {
 global:
         sd_machine_get_ifindices;
-} LIBSYSTEMD_213;
+} LIBSYSTEMD_214;
 
 LIBSYSTEMD_217 {
 global:
@@ -186,88 +183,88 @@ global:
         sd_bus_new;
         sd_bus_set_address;
         sd_bus_set_fd;
-        /* sd_bus_set_exec; */
-        /* sd_bus_get_address; */
+        sd_bus_set_exec;
+        sd_bus_get_address;
         sd_bus_set_bus_client;
-        /* sd_bus_is_bus_client; */
+        sd_bus_is_bus_client;
         sd_bus_set_server;
-        /* sd_bus_is_server; */
+        sd_bus_is_server;
         sd_bus_set_anonymous;
-        /* sd_bus_is_anonymous; */
-        /* sd_bus_set_trusted; */
-        /* sd_bus_is_trusted; */
-        /* sd_bus_set_monitor; */
-        /* sd_bus_is_monitor; */
-        /* sd_bus_set_description; */
-        /* sd_bus_get_description; */
-        /* sd_bus_negotiate_creds; */
-        /* sd_bus_negotiate_timestamp; */
+        sd_bus_is_anonymous;
+        sd_bus_set_trusted;
+        sd_bus_is_trusted;
+        sd_bus_set_monitor;
+        sd_bus_is_monitor;
+        sd_bus_set_description;
+        sd_bus_get_description;
+        sd_bus_negotiate_creds;
+        sd_bus_negotiate_timestamp;
         sd_bus_negotiate_fds;
         sd_bus_can_send;
-        /* sd_bus_get_creds_mask; */
+        sd_bus_get_creds_mask;
         sd_bus_set_allow_interactive_authorization;
-        /* sd_bus_get_allow_interactive_authorization; */
+        sd_bus_get_allow_interactive_authorization;
         sd_bus_start;
         sd_bus_close;
-        /* sd_bus_try_close; */
+        sd_bus_try_close;
         sd_bus_ref;
         sd_bus_unref;
-        /* sd_bus_is_open; */
-        /* sd_bus_get_bus_id; */
-        /* sd_bus_get_scope; */
-        /* sd_bus_get_tid; */
+        sd_bus_is_open;
+        sd_bus_get_bus_id;
+        sd_bus_get_scope;
+        sd_bus_get_tid;
         sd_bus_get_owner_creds;
         sd_bus_send;
-        /* sd_bus_send_to; */
+        sd_bus_send_to;
         sd_bus_call;
         sd_bus_call_async;
-        /* sd_bus_get_fd; */
+        sd_bus_get_fd;
         sd_bus_get_events;
         sd_bus_get_timeout;
         sd_bus_process;
-        /* sd_bus_process_priority; */
+        sd_bus_process_priority;
         sd_bus_wait;
         sd_bus_flush;
-        /* sd_bus_get_current_slot; */
+        sd_bus_get_current_slot;
         sd_bus_get_current_message;
         sd_bus_get_current_handler;
         sd_bus_get_current_userdata;
         sd_bus_attach_event;
         sd_bus_detach_event;
         sd_bus_get_event;
-        /* sd_bus_add_filter; */
+        sd_bus_add_filter;
         sd_bus_add_match;
         sd_bus_add_object;
         sd_bus_add_fallback;
         sd_bus_add_object_vtable;
         sd_bus_add_fallback_vtable;
         sd_bus_add_node_enumerator;
-        /* sd_bus_add_object_manager; */
+        sd_bus_add_object_manager;
         sd_bus_slot_ref;
         sd_bus_slot_unref;
-        /* sd_bus_slot_get_bus; */
-        /* sd_bus_slot_get_userdata; */
-        /* sd_bus_slot_set_userdata; */
-        /* sd_bus_slot_get_description; */
-        /* sd_bus_slot_set_description; */
-        /* sd_bus_slot_get_current_message; */
-        /* sd_bus_slot_get_current_handler; */
-        /* sd_bus_slot_get_current_userdata; */
+        sd_bus_slot_get_bus;
+        sd_bus_slot_get_userdata;
+        sd_bus_slot_set_userdata;
+        sd_bus_slot_get_description;
+        sd_bus_slot_set_description;
+        sd_bus_slot_get_current_message;
+        sd_bus_slot_get_current_handler;
+        sd_bus_slot_get_current_userdata;
         sd_bus_message_new_signal;
         sd_bus_message_new_method_call;
         sd_bus_message_new_method_return;
         sd_bus_message_new_method_error;
         sd_bus_message_new_method_errorf;
         sd_bus_message_new_method_errno;
-        /* sd_bus_message_new_method_errnof; */
+        sd_bus_message_new_method_errnof;
         sd_bus_message_ref;
         sd_bus_message_unref;
-        /* sd_bus_message_get_type; */
-        /* sd_bus_message_get_cookie; */
-        /* sd_bus_message_get_reply_cookie; */
-        /* sd_bus_message_get_priority; */
-        /* sd_bus_message_get_expect_reply; */
-        /* sd_bus_message_get_auto_start; */
+        sd_bus_message_get_type;
+        sd_bus_message_get_cookie;
+        sd_bus_message_get_reply_cookie;
+        sd_bus_message_get_priority;
+        sd_bus_message_get_expect_reply;
+        sd_bus_message_get_auto_start;
         sd_bus_message_get_allow_interactive_authorization;
         sd_bus_message_get_signature;
         sd_bus_message_get_path;
@@ -277,30 +274,30 @@ global:
         sd_bus_message_get_sender;
         sd_bus_message_get_error;
         sd_bus_message_get_errno;
-        /* sd_bus_message_get_monotonic_usec; */
-        /* sd_bus_message_get_realtime_usec; */
-        /* sd_bus_message_get_seqnum; */
+        sd_bus_message_get_monotonic_usec;
+        sd_bus_message_get_realtime_usec;
+        sd_bus_message_get_seqnum;
         sd_bus_message_get_bus;
         sd_bus_message_get_creds;
         sd_bus_message_is_signal;
         sd_bus_message_is_method_call;
         sd_bus_message_is_method_error;
-        /* sd_bus_message_is_empty; */
-        /* sd_bus_message_has_signature; */
-        /* sd_bus_message_set_expect_reply; */
-        /* sd_bus_message_set_auto_start; */
-        /* sd_bus_message_set_allow_interactive_authorization; */
+        sd_bus_message_is_empty;
+        sd_bus_message_has_signature;
+        sd_bus_message_set_expect_reply;
+        sd_bus_message_set_auto_start;
+        sd_bus_message_set_allow_interactive_authorization;
         sd_bus_message_set_destination;
-        /* sd_bus_message_set_priority; */
+        sd_bus_message_set_priority;
         sd_bus_message_append;
         sd_bus_message_append_basic;
-        /* sd_bus_message_append_array; */
+        sd_bus_message_append_array;
         sd_bus_message_append_array_space;
-        /* sd_bus_message_append_array_iovec; */
-        /* sd_bus_message_append_array_memfd; */
-        /* sd_bus_message_append_string_space; */
-        /* sd_bus_message_append_string_iovec; */
-        /* sd_bus_message_append_string_memfd; */
+        sd_bus_message_append_array_iovec;
+        sd_bus_message_append_array_memfd;
+        sd_bus_message_append_string_space;
+        sd_bus_message_append_string_iovec;
+        sd_bus_message_append_string_memfd;
         sd_bus_message_append_strv;
         sd_bus_message_open_container;
         sd_bus_message_close_container;
@@ -313,27 +310,27 @@ global:
         sd_bus_message_enter_container;
         sd_bus_message_exit_container;
         sd_bus_message_peek_type;
-        /* sd_bus_message_verify_type; */
-        /* sd_bus_message_at_end; */
+        sd_bus_message_verify_type;
+        sd_bus_message_at_end;
         sd_bus_message_rewind;
         sd_bus_get_unique_name;
         sd_bus_request_name;
         sd_bus_release_name;
         sd_bus_list_names;
         sd_bus_get_name_creds;
-        /* sd_bus_get_name_machine_id; */
+        sd_bus_get_name_machine_id;
         sd_bus_call_method;
-        /* sd_bus_call_method_async; */
+        sd_bus_call_method_async;
         sd_bus_get_property;
         sd_bus_get_property_trivial;
         sd_bus_get_property_string;
-        /* sd_bus_get_property_strv; */
-        /* sd_bus_set_property; */
+        sd_bus_get_property_strv;
+        sd_bus_set_property;
         sd_bus_reply_method_return;
         sd_bus_reply_method_error;
         sd_bus_reply_method_errorf;
         sd_bus_reply_method_errno;
-        /* sd_bus_reply_method_errnof; */
+        sd_bus_reply_method_errnof;
         sd_bus_emit_signal;
         sd_bus_emit_properties_changed_strv;
         sd_bus_emit_properties_changed;
@@ -343,28 +340,28 @@ global:
         sd_bus_emit_interfaces_removed;
         sd_bus_query_sender_creds;
         sd_bus_query_sender_privilege;
-        /* sd_bus_creds_new_from_pid; */
+        sd_bus_creds_new_from_pid;
         sd_bus_creds_ref;
         sd_bus_creds_unref;
-        /* sd_bus_creds_get_mask; */
+        sd_bus_creds_get_mask;
         sd_bus_creds_get_augmented_mask;
         sd_bus_creds_get_pid;
-        /* sd_bus_creds_get_ppid; */
+        sd_bus_creds_get_ppid;
         sd_bus_creds_get_tid;
         sd_bus_creds_get_uid;
         sd_bus_creds_get_euid;
-        /* sd_bus_creds_get_suid; */
-        /* sd_bus_creds_get_fsuid; */
-        /* sd_bus_creds_get_gid; */
+        sd_bus_creds_get_suid;
+        sd_bus_creds_get_fsuid;
+        sd_bus_creds_get_gid;
         sd_bus_creds_get_egid;
-        /* sd_bus_creds_get_sgid; */
-        /* sd_bus_creds_get_fsgid; */
-        /* sd_bus_creds_get_supplementary_gids; */
-        /* sd_bus_creds_get_comm; */
-        /* sd_bus_creds_get_tid_comm; */
-        /* sd_bus_creds_get_exe; */
+        sd_bus_creds_get_sgid;
+        sd_bus_creds_get_fsgid;
+        sd_bus_creds_get_supplementary_gids;
+        sd_bus_creds_get_comm;
+        sd_bus_creds_get_tid_comm;
+        sd_bus_creds_get_exe;
         sd_bus_creds_get_cmdline;
-        /* sd_bus_creds_get_cgroup; */
+        sd_bus_creds_get_cgroup;
         /* sd_bus_creds_get_unit; */
         /* sd_bus_creds_get_slice; */
         /* sd_bus_creds_get_user_unit; */
@@ -372,16 +369,16 @@ global:
         sd_bus_creds_get_session;
         sd_bus_creds_get_owner_uid;
         sd_bus_creds_has_effective_cap;
-        /* sd_bus_creds_has_permitted_cap; */
-        /* sd_bus_creds_has_inheritable_cap; */
-        /* sd_bus_creds_has_bounding_cap; */
+        sd_bus_creds_has_permitted_cap;
+        sd_bus_creds_has_inheritable_cap;
+        sd_bus_creds_has_bounding_cap;
         sd_bus_creds_get_selinux_context;
-        /* sd_bus_creds_get_audit_session_id; */
+        sd_bus_creds_get_audit_session_id;
         sd_bus_creds_get_audit_login_uid;
         sd_bus_creds_get_tty;
-        /* sd_bus_creds_get_unique_name; */
-        /* sd_bus_creds_get_well_known_names; */
-        /* sd_bus_creds_get_description; */
+        sd_bus_creds_get_unique_name;
+        sd_bus_creds_get_well_known_names;
+        sd_bus_creds_get_description;
         sd_bus_error_free;
         sd_bus_error_set;
         sd_bus_error_setf;
@@ -394,14 +391,14 @@ global:
         sd_bus_error_is_set;
         sd_bus_error_has_name;
         sd_bus_error_add_map;
-        /* sd_bus_path_encode; */
-        /* sd_bus_path_decode; */
+        sd_bus_path_encode;
+        sd_bus_path_decode;
         sd_bus_track_new;
         sd_bus_track_ref;
         sd_bus_track_unref;
         sd_bus_track_get_bus;
-        /* sd_bus_track_get_userdata; */
-        /* sd_bus_track_set_userdata; */
+        sd_bus_track_get_userdata;
+        sd_bus_track_set_userdata;
         sd_bus_track_add_sender;
         sd_bus_track_remove_sender;
         sd_bus_track_add_name;
@@ -430,44 +427,44 @@ global:
         sd_event_loop;
         sd_event_exit;
         sd_event_now;
-        /* sd_event_get_fd; */
+        sd_event_get_fd;
         sd_event_get_state;
-        /* sd_event_get_tid; */
-        /* sd_event_get_exit_code; */
+        sd_event_get_tid;
+        sd_event_get_exit_code;
         sd_event_set_watchdog;
-        /* sd_event_get_watchdog; */
-        /* sd_event_source_ref; */
+        sd_event_get_watchdog;
+        sd_event_source_ref;
         sd_event_source_unref;
         sd_event_source_get_event;
-        /* sd_event_source_get_userdata; */
-        /* sd_event_source_set_userdata; */
+        sd_event_source_get_userdata;
+        sd_event_source_set_userdata;
         sd_event_source_set_description;
-        /* sd_event_source_get_description; */
+        sd_event_source_get_description;
         sd_event_source_set_prepare;
-        /* sd_event_source_get_pending; */
+        sd_event_source_get_pending;
         sd_event_source_get_priority;
         sd_event_source_set_priority;
-        /* sd_event_source_get_enabled; */
+        sd_event_source_get_enabled;
         sd_event_source_set_enabled;
-        /* sd_event_source_get_io_fd; */
+        sd_event_source_get_io_fd;
         sd_event_source_set_io_fd;
-        /* sd_event_source_get_io_events; */
+        sd_event_source_get_io_events;
         sd_event_source_set_io_events;
-        /* sd_event_source_get_io_revents; */
+        sd_event_source_get_io_revents;
         sd_event_source_get_time;
         sd_event_source_set_time;
-        /* sd_event_source_set_time_accuracy; */
-        /* sd_event_source_get_time_accuracy; */
-        /* sd_event_source_get_time_clock; */
-        /* sd_event_source_get_signal; */
-        /* sd_event_source_get_child_pid; */
+        sd_event_source_set_time_accuracy;
+        sd_event_source_get_time_accuracy;
+        sd_event_source_get_time_clock;
+        sd_event_source_get_signal;
+        sd_event_source_get_child_pid;
 } LIBSYSTEMD_220;
 
 LIBSYSTEMD_222 {
 global:
         /* sd-bus */
         sd_bus_emit_object_added;
-        /* sd_bus_emit_object_removed; */
+        sd_bus_emit_object_removed;
         sd_bus_flush_close_unref;
 } LIBSYSTEMD_221;
 
@@ -479,10 +476,10 @@ global:
 
 LIBSYSTEMD_227 {
 global:
-        /* sd_bus_default_flush_close; */
-        /* sd_bus_path_decode_many; */
-        /* sd_bus_path_encode_many; */
-        sd_listen_fds_with_names;
+        sd_bus_default_flush_close;
+        sd_bus_path_decode_many;
+        sd_bus_path_encode_many;
+        /* sd_listen_fds_with_names; */
 } LIBSYSTEMD_226;
 
 /*
@@ -524,7 +521,7 @@ global:
 LIBSYSTEMD_233 {
 global:
         sd_id128_get_machine_app_specific;
-        /* sd_is_socket_sockaddr; */
+        sd_is_socket_sockaddr;
 } LIBSYSTEMD_232;
 
 LIBSYSTEMD_234 {
index 23f83a631de033c2ab0fe1c7d816a1c5a75d4ac1..fcd4d27e07e244b10cb24369b5d2affcb4b46af5 100644 (file)
@@ -695,7 +695,6 @@ int bus_remove_match_internal(
         return bus_remove_match_internal_dbus1(bus, match);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine) {
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL, *m = NULL;
         const char *mid;
@@ -740,4 +739,3 @@ _public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_
 
         return sd_id128_from_string(mid, machine);
 }
-#endif // 0
index 85c8e39795c0bd2098c42321e91e5e10253a75a8..e171c53e21b947c5810309ac70b6fc72d93114d9 100644 (file)
@@ -57,7 +57,6 @@ _public_ int sd_bus_emit_signal(
         return sd_bus_send(bus, m, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_call_method_async(
                 sd_bus *bus,
                 sd_bus_slot **slot,
@@ -94,7 +93,6 @@ _public_ int sd_bus_call_method_async(
 
         return sd_bus_call_async(bus, slot, m, callback, userdata, 0);
 }
-#endif // 0
 
 _public_ int sd_bus_call_method(
                 sd_bus *bus,
@@ -255,7 +253,6 @@ _public_ int sd_bus_reply_method_errno(
         return sd_bus_reply_method_error(call, &berror);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_reply_method_errnof(
                 sd_bus_message *call,
                 int error,
@@ -283,7 +280,6 @@ _public_ int sd_bus_reply_method_errnof(
 
         return sd_bus_reply_method_error(call, &berror);
 }
-#endif // 0
 
 _public_ int sd_bus_get_property(
                 sd_bus *bus,
@@ -419,7 +415,6 @@ fail:
         return sd_bus_error_set_errno(error, r);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_property_strv(
                 sd_bus *bus,
                 const char *destination,
@@ -512,7 +507,6 @@ _public_ int sd_bus_set_property(
 fail:
         return sd_bus_error_set_errno(error, r);
 }
-#endif // 0
 
 _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) {
         sd_bus_creds *c;
index 4e2708b2cfd6d06e13cca7ba35de5d6232bac43b..57e7b0c579ba5ee5e8ab51bee6eac9d4c72340a5 100644 (file)
@@ -132,13 +132,11 @@ _public_ sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c) {
         assert_return(c, 0);
 
         return c->mask;
 }
-#endif // 0
 
 _public_ uint64_t sd_bus_creds_get_augmented_mask(const sd_bus_creds *c) {
         assert_return(c, 0);
@@ -158,7 +156,6 @@ sd_bus_creds* bus_creds_new(void) {
         return c;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) {
         sd_bus_creds *c;
         int r;
@@ -190,7 +187,6 @@ _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t m
         *ret = c;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid) {
         assert_return(c, -EINVAL);
@@ -214,7 +210,6 @@ _public_ int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid) {
         assert_return(c, -EINVAL);
         assert_return(suid, -EINVAL);
@@ -248,7 +243,6 @@ _public_ int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid) {
         *gid = c->gid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid) {
         assert_return(c, -EINVAL);
@@ -261,7 +255,6 @@ _public_ int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid) {
         assert_return(c, -EINVAL);
         assert_return(sgid, -EINVAL);
@@ -294,7 +287,6 @@ _public_ int sd_bus_creds_get_supplementary_gids(sd_bus_creds *c, const gid_t **
         *gids = c->supplementary_gids;
         return (int) c->n_supplementary_gids;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid) {
         assert_return(c, -EINVAL);
@@ -308,7 +300,6 @@ _public_ int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) {
         assert_return(c, -EINVAL);
         assert_return(ppid, -EINVAL);
@@ -325,7 +316,6 @@ _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) {
         *ppid = c->ppid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid) {
         assert_return(c, -EINVAL);
@@ -350,7 +340,6 @@ _public_ int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **ret)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_comm(sd_bus_creds *c, const char **ret) {
         assert_return(c, -EINVAL);
         assert_return(ret, -EINVAL);
@@ -401,6 +390,7 @@ _public_ int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **ret) {
         return 0;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_unit(sd_bus_creds *c, const char **ret) {
         int r;
 
@@ -625,7 +615,6 @@ _public_ int sd_bus_creds_get_tty(sd_bus_creds *c, const char **ret) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **unique_name) {
         assert_return(c, -EINVAL);
         assert_return(unique_name, -EINVAL);
@@ -688,7 +677,6 @@ _public_ int sd_bus_creds_get_description(sd_bus_creds *c, const char **ret) {
         *ret = c->unescaped_description;
         return 0;
 }
-#endif // 0
 
 static int has_cap(sd_bus_creds *c, unsigned offset, int capability) {
         size_t sz;
@@ -715,7 +703,6 @@ _public_ int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability) {
         return has_cap(c, CAP_OFFSET_EFFECTIVE, capability);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability) {
         assert_return(c, -EINVAL);
         assert_return(capability >= 0, -EINVAL);
@@ -745,7 +732,6 @@ _public_ int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability) {
 
         return has_cap(c, CAP_OFFSET_BOUNDING, capability);
 }
-#endif // 0
 
 static int parse_caps(sd_bus_creds *c, unsigned offset, const char *p) {
         size_t sz, max;
index cfff484a84767f818ad8adbbaa08a301b4fb7ec0..0440cbf2088e7d4d7eff1a75feeaeddd966cad10 100644 (file)
@@ -810,7 +810,6 @@ _public_ int sd_bus_message_new_method_errno(
         return sd_bus_message_new_method_error(call, m, &berror);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_new_method_errnof(
                 sd_bus_message *call,
                 sd_bus_message **m,
@@ -827,7 +826,6 @@ _public_ int sd_bus_message_new_method_errnof(
 
         return sd_bus_message_new_method_error(call, m, &berror);
 }
-#endif // 0
 
 void bus_message_set_sender_local(sd_bus *bus, sd_bus_message *m) {
         assert(bus);
@@ -925,7 +923,6 @@ _public_ sd_bus_message* sd_bus_message_unref(sd_bus_message *m) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type) {
         assert_return(m, -EINVAL);
         assert_return(type, -EINVAL);
@@ -971,7 +968,6 @@ _public_ int sd_bus_message_get_auto_start(sd_bus_message *m) {
 
         return !(m->header->flags & BUS_MESSAGE_NO_AUTO_START);
 }
-#endif // 0
 
 _public_ int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m) {
         assert_return(m, -EINVAL);
@@ -1019,7 +1015,6 @@ _public_ const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m) {
         return &m->error;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec) {
         assert_return(m, -EINVAL);
         assert_return(usec, -EINVAL);
@@ -1052,7 +1047,6 @@ _public_ int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t *seqnum) {
         *seqnum = m->seqnum;
         return 0;
 }
-#endif // 0
 
 _public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) {
         assert_return(m, NULL);
@@ -1113,7 +1107,6 @@ _public_ int sd_bus_message_is_method_error(sd_bus_message *m, const char *name)
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_set_expect_reply(sd_bus_message *m, int b) {
         assert_return(m, -EINVAL);
         assert_return(!m->sealed, -EPERM);
@@ -1141,7 +1134,6 @@ _public_ int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *
 
         return 0;
 }
-#endif // 0
 
 static struct bus_container *message_get_container(sd_bus_message *m) {
         assert(m);
@@ -1593,7 +1585,6 @@ _public_ int sd_bus_message_append_basic(sd_bus_message *m, char type, const voi
         return message_append_basic(m, type, p, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_append_string_space(
                 sd_bus_message *m,
                 size_t size,
@@ -1684,7 +1675,6 @@ _public_ int sd_bus_message_append_string_iovec(
 
         return 0;
 }
-#endif // 0
 
 static int bus_message_open_array(
                 sd_bus_message *m,
@@ -2552,7 +2542,6 @@ _public_ int sd_bus_message_append_array_space(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_append_array(
                 sd_bus_message *m,
                 char type,
@@ -2786,7 +2775,6 @@ _public_ int sd_bus_message_append_string_memfd(
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_message_append_strv(sd_bus_message *m, char **l) {
         char **i;
@@ -3087,7 +3075,6 @@ static bool message_end_of_array(sd_bus_message *m, size_t index) {
         }
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) {
         assert_return(m, -EINVAL);
         assert_return(m->sealed, -EPERM);
@@ -3103,7 +3090,6 @@ _public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) {
 
         return false;
 }
-#endif // 0
 
 static struct bus_body_part* find_part(sd_bus_message *m, size_t index, size_t sz, void **p) {
         struct bus_body_part *part;
@@ -5655,7 +5641,6 @@ _public_ const char* sd_bus_message_get_signature(sd_bus_message *m, int complet
         return strempty(c->signature);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_is_empty(sd_bus_message *m) {
         assert_return(m, -EINVAL);
 
@@ -5667,7 +5652,6 @@ _public_ int sd_bus_message_has_signature(sd_bus_message *m, const char *signatu
 
         return streq(strempty(m->root_container.signature), strempty(signature));
 }
-#endif // 0
 
 _public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) {
         bool done_something = false;
@@ -5746,7 +5730,6 @@ _public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int
         return done_something;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents) {
         const char *c;
         char t;
@@ -5771,7 +5754,6 @@ _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char
 
         return 1;
 }
-#endif // 0
 
 _public_ sd_bus *sd_bus_message_get_bus(sd_bus_message *m) {
         assert_return(m, NULL);
@@ -5874,6 +5856,7 @@ int bus_message_append_sender(sd_bus_message *m, const char *sender) {
 
         return message_append_field_string(m, BUS_MESSAGE_HEADER_SENDER, SD_BUS_TYPE_STRING, sender, &m->sender);
 }
+#endif // 0
 
 _public_ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority) {
         assert_return(m, -EINVAL);
@@ -5890,4 +5873,3 @@ _public_ int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority) {
         m->priority = priority;
         return 0;
 }
-#endif // 0
index 37a49123e9cd0ee5a3eca1a9e5c4c7886a039caf..df2bdc806ce97645bb825d3563d591feb843eeca 100644 (file)
@@ -2385,7 +2385,6 @@ _public_ int sd_bus_emit_object_added(sd_bus *bus, const char *path) {
         return sd_bus_send(bus, m, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 static int object_removed_append_all_prefix(
                 sd_bus *bus,
                 sd_bus_message *m,
@@ -2555,7 +2554,6 @@ _public_ int sd_bus_emit_object_removed(sd_bus *bus, const char *path) {
 
         return sd_bus_send(bus, m, NULL);
 }
-#endif // 0
 
 static int interfaces_added_append_one_prefix(
                 sd_bus *bus,
@@ -2794,7 +2792,6 @@ _public_ int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const
         return sd_bus_emit_interfaces_removed_strv(bus, path, interfaces);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path) {
         sd_bus_slot *s;
         struct node *n;
@@ -2829,4 +2826,3 @@ fail:
 
         return r;
 }
-#endif // 0
index 9fba5634a8d6b1fe89e23a614e0e89a1687604ac..725265b331c300f428fbf4a39424d2324ed48e67 100644 (file)
@@ -215,7 +215,6 @@ _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) {
         return mfree(slot);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot) {
         assert_return(slot, NULL);
 
@@ -283,4 +282,3 @@ _public_ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **descrip
         *description = slot->description;
         return 0;
 }
-#endif // 0
index 9714da690f6ee88fb5345b476651b4c11448929b..8a2248bc6e17d9d14ef9d0c6aa065a3e547715de 100644 (file)
@@ -455,7 +455,6 @@ void bus_track_close(sd_bus_track *track) {
                 bus_track_dispatch(track);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ void *sd_bus_track_get_userdata(sd_bus_track *track) {
         assert_return(track, NULL);
 
@@ -473,6 +472,7 @@ _public_ void *sd_bus_track_set_userdata(sd_bus_track *track, void *userdata) {
         return ret;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_track_set_recursive(sd_bus_track *track, int b) {
         assert_return(track, -EINVAL);
 
index 107fc363cf87a3cc3fd4b22a4d97b8a92d8ff9ac..38730da9efaeb4939a7dd8183ee6a370e70da361 100644 (file)
@@ -233,7 +233,6 @@ _public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) {
         char *p, **a;
 
@@ -261,7 +260,6 @@ _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[])
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_set_bus_client(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -272,7 +270,6 @@ _public_ int sd_bus_set_bus_client(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_monitor(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
@@ -281,7 +278,6 @@ _public_ int sd_bus_set_monitor(sd_bus *bus, int b) {
         SET_FLAG(bus->hello_flags, KDBUS_HELLO_MONITOR, b);
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -292,7 +288,6 @@ _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_negotiate_timestamp(sd_bus *bus, int b) {
         uint64_t new_flags;
         assert_return(bus, -EINVAL);
@@ -332,7 +327,6 @@ _public_ int sd_bus_negotiate_creds(sd_bus *bus, int b, uint64_t mask) {
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id) {
         assert_return(bus, -EINVAL);
@@ -354,7 +348,6 @@ _public_ int sd_bus_set_anonymous(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_trusted(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
@@ -371,7 +364,6 @@ _public_ int sd_bus_set_description(sd_bus *bus, const char *description) {
 
         return free_and_strdup(&bus->description, description);
 }
-#endif // 0
 
 _public_ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -381,14 +373,12 @@ _public_ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_allow_interactive_authorization(sd_bus *bus) {
         assert_return(bus, -EINVAL);
         assert_return(!bus_pid_changed(bus), -ECHILD);
 
         return bus->allow_interactive_authorization;
 }
-#endif // 0
 
 static int hello_callback(sd_bus_message *reply, void *userdata, sd_bus_error *error) {
         const char *s;
@@ -1375,7 +1365,6 @@ _public_ sd_bus *sd_bus_unref(sd_bus *bus) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_is_open(sd_bus *bus) {
 
         assert_return(bus, -EINVAL);
@@ -1383,7 +1372,6 @@ _public_ int sd_bus_is_open(sd_bus *bus) {
 
         return BUS_IS_OPEN(bus->state);
 }
-#endif // 0
 
 _public_ int sd_bus_can_send(sd_bus *bus, char type) {
         int r;
@@ -1409,7 +1397,6 @@ _public_ int sd_bus_can_send(sd_bus *bus, char type) {
         return bus_type_is_valid(type);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
         int r;
 
@@ -1424,7 +1411,6 @@ _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
         *id = bus->server_id;
         return 0;
 }
-#endif // 0
 
 static int bus_seal_message(sd_bus *b, sd_bus_message *m, usec_t timeout) {
         assert(b);
@@ -1686,7 +1672,6 @@ _public_ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie) {
         return bus_send_internal(bus, m, cookie, false);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie) {
         int r;
 
@@ -1712,7 +1697,6 @@ _public_ int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destinat
 
         return sd_bus_send(bus, m, cookie);
 }
-#endif // 0
 
 static usec_t calc_elapse(uint64_t usec) {
         if (usec == (uint64_t) -1)
@@ -1995,7 +1979,6 @@ fail:
         return sd_bus_error_set_errno(error, r);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_fd(sd_bus *bus) {
 
         assert_return(bus, -EINVAL);
@@ -2004,7 +1987,6 @@ _public_ int sd_bus_get_fd(sd_bus *bus) {
 
         return bus->input_fd;
 }
-#endif // 0
 
 _public_ int sd_bus_get_events(sd_bus *bus) {
         int flags = 0;
@@ -2718,11 +2700,9 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
         return bus_process_internal(bus, false, 0, ret);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_process_priority(sd_bus *bus, int64_t priority, sd_bus_message **ret) {
         return bus_process_internal(bus, true, priority, ret);
 }
-#endif // 0
 
 static int bus_poll(sd_bus *bus, bool need_more, uint64_t timeout_usec) {
         struct pollfd p[2] = {};
@@ -2839,7 +2819,6 @@ _public_ int sd_bus_flush(sd_bus *bus) {
         }
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_add_filter(
                 sd_bus *bus,
                 sd_bus_slot **slot,
@@ -2866,7 +2845,6 @@ _public_ int sd_bus_add_filter(
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_add_match(
                 sd_bus *bus,
@@ -3215,13 +3193,11 @@ _public_ sd_bus_message* sd_bus_get_current_message(sd_bus *bus) {
         return bus->current_message;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus) {
         assert_return(bus, NULL);
 
         return bus->current_slot;
 }
-#endif // 0
 
 _public_ sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus) {
         assert_return(bus, NULL);
@@ -3315,7 +3291,6 @@ _public_ int sd_bus_default(sd_bus **ret) {
                 return sd_bus_default_system(ret);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_tid(sd_bus *b, pid_t *tid) {
         assert_return(b, -EINVAL);
         assert_return(tid, -EINVAL);
@@ -3555,7 +3530,6 @@ _public_ int sd_bus_get_description(sd_bus *bus, const char **description) {
         *description = bus->description;
         return 0;
 }
-#endif // 0
 
 int bus_get_root_path(sd_bus *bus) {
         int r;
@@ -3575,7 +3549,6 @@ int bus_get_root_path(sd_bus *bus) {
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) {
         assert_return(bus, -EINVAL);
         assert_return(scope, -EINVAL);
@@ -3665,10 +3638,11 @@ static void flush_close(sd_bus *bus) {
 
 _public_ void sd_bus_default_flush_close(void) {
         flush_close(default_starter_bus);
+#if 0 /// elogind does not support user buses
         flush_close(default_user_bus);
+#endif // 0
         flush_close(default_system_bus);
 }
-#endif // 0
 
 _public_ int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
index 87e7f784247ba72365b330b93911e597244e0a85..755ba7501184a13b77b2fd84691e94dc7c128311 100644 (file)
@@ -148,7 +148,6 @@ _public_ int sd_listen_fds_with_names(int unset_environment, char ***names) {
         return n_fds;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_fifo(int fd, const char *path) {
         struct stat st_fd;
 
@@ -213,7 +212,6 @@ _public_ int sd_is_special(int fd, const char *path) {
 
         return 1;
 }
-#endif // 0
 
 static int sd_is_socket_internal(int fd, int type, int listening) {
         struct stat st_fd;
@@ -284,7 +282,6 @@ _public_ int sd_is_socket(int fd, int family, int type, int listening) {
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
         union sockaddr_union sockaddr = {};
         socklen_t l = sizeof(sockaddr);
@@ -428,6 +425,7 @@ _public_ int sd_is_socket_unix(int fd, int type, int listening, const char *path
         return 1;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_mq(int fd, const char *path) {
         struct mq_attr attr;
 
@@ -587,17 +585,14 @@ finish:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_pid_notify(pid_t pid, int unset_environment, const char *state) {
         return sd_pid_notify_with_fds(pid, unset_environment, state, NULL, 0);
 }
-#endif // 0
 
 _public_ int sd_notify(int unset_environment, const char *state) {
         return sd_pid_notify_with_fds(0, unset_environment, state, NULL, 0);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) {
         _cleanup_free_ char *p = NULL;
         int r;
@@ -633,7 +628,6 @@ _public_ int sd_notifyf(int unset_environment, const char *format, ...) {
 
         return sd_pid_notify(0, unset_environment, p);
 }
-#endif // 0
 
 _public_ int sd_booted(void) {
         /* We test whether the runtime unit file directory has been
index 7c0e436f0256165615fa728c70b4ce2285c3ed49..2c5c2ebb4dc40a88736bda5d6b99fe62f28ccce4 100644 (file)
@@ -546,7 +546,6 @@ static int source_io_register(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 static clockid_t event_source_type_to_clock(EventSourceType t) {
 
         switch (t) {
@@ -570,7 +569,6 @@ static clockid_t event_source_type_to_clock(EventSourceType t) {
                 return (clockid_t) -1;
         }
 }
-#endif // 0
 
 static EventSourceType clock_to_event_source_type(clockid_t clock) {
 
@@ -1366,7 +1364,6 @@ _public_ int sd_event_add_exit(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_event_source* sd_event_source_ref(sd_event_source *s) {
 
         if (!s)
@@ -1377,7 +1374,6 @@ _public_ sd_event_source* sd_event_source_ref(sd_event_source *s) {
 
         return s;
 }
-#endif // 0
 
 _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
 
@@ -1415,7 +1411,6 @@ _public_ int sd_event_source_set_description(sd_event_source *s, const char *des
         return free_and_strdup(&s->description, description);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_description(sd_event_source *s, const char **description) {
         assert_return(s, -EINVAL);
         assert_return(description, -EINVAL);
@@ -1425,7 +1420,6 @@ _public_ int sd_event_source_get_description(sd_event_source *s, const char **de
         *description = s->description;
         return 0;
 }
-#endif // 0
 
 _public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
         assert_return(s, NULL);
@@ -1433,7 +1427,6 @@ _public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
         return s->event;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_pending(sd_event_source *s) {
         assert_return(s, -EINVAL);
         assert_return(s->type != SOURCE_EXIT, -EDOM);
@@ -1450,7 +1443,6 @@ _public_ int sd_event_source_get_io_fd(sd_event_source *s) {
 
         return s->io.fd;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) {
         int r;
@@ -1488,7 +1480,6 @@ _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events) {
         assert_return(s, -EINVAL);
         assert_return(events, -EINVAL);
@@ -1498,7 +1489,6 @@ _public_ int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events)
         *events = s->io.events;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events) {
         int r;
@@ -1525,7 +1515,6 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents) {
         assert_return(s, -EINVAL);
         assert_return(revents, -EINVAL);
@@ -1544,7 +1533,6 @@ _public_ int sd_event_source_get_signal(sd_event_source *s) {
 
         return s->signal.sig;
 }
-#endif // 0
 
 _public_ int sd_event_source_get_priority(sd_event_source *s, int64_t *priority) {
         assert_return(s, -EINVAL);
@@ -1596,7 +1584,6 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
         assert_return(s, -EINVAL);
         assert_return(m, -EINVAL);
@@ -1605,7 +1592,6 @@ _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
         *m = s->enabled;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
         int r;
@@ -1791,7 +1777,6 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec) {
         assert_return(s, -EINVAL);
         assert_return(usec, -EINVAL);
@@ -1846,7 +1831,6 @@ _public_ int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid) {
         *pid = s->child.pid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback) {
         int r;
@@ -1880,7 +1864,6 @@ _public_ int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ void* sd_event_source_get_userdata(sd_event_source *s) {
         assert_return(s, NULL);
 
@@ -1897,7 +1880,6 @@ _public_ void *sd_event_source_set_userdata(sd_event_source *s, void *userdata)
 
         return ret;
 }
-#endif // 0
 
 static usec_t sleep_between(sd_event *e, usec_t a, usec_t b) {
         usec_t c;
@@ -2732,7 +2714,6 @@ finish:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_fd(sd_event *e) {
 
         assert_return(e, -EINVAL);
@@ -2740,7 +2721,6 @@ _public_ int sd_event_get_fd(sd_event *e) {
 
         return e->epoll_fd;
 }
-#endif // 0
 
 _public_ int sd_event_get_state(sd_event *e) {
         assert_return(e, -EINVAL);
@@ -2749,7 +2729,6 @@ _public_ int sd_event_get_state(sd_event *e) {
         return e->state;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_exit_code(sd_event *e, int *code) {
         assert_return(e, -EINVAL);
         assert_return(code, -EINVAL);
@@ -2761,7 +2740,6 @@ _public_ int sd_event_get_exit_code(sd_event *e, int *code) {
         *code = e->exit_code;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_exit(sd_event *e, int code) {
         assert_return(e, -EINVAL);
@@ -2825,7 +2803,6 @@ _public_ int sd_event_default(sd_event **ret) {
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_tid(sd_event *e, pid_t *tid) {
         assert_return(e, -EINVAL);
         assert_return(tid, -EINVAL);
@@ -2838,7 +2815,6 @@ _public_ int sd_event_get_tid(sd_event *e, pid_t *tid) {
 
         return -ENXIO;
 }
-#endif // 0
 
 _public_ int sd_event_set_watchdog(sd_event *e, int b) {
         int r;
@@ -2892,14 +2868,12 @@ fail:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_watchdog(sd_event *e) {
         assert_return(e, -EINVAL);
         assert_return(!event_pid_changed(e), -ECHILD);
 
         return e->watchdog;
 }
-#endif // 0
 
 _public_ int sd_event_get_iteration(sd_event *e, uint64_t *ret) {
         assert_return(e, -EINVAL);
index ca44a441223a13cbf74fc49da9509361f06ae3ad..1990dd6c5d710a23e6e66ac19bb273f7bb954e7f 100644 (file)
@@ -126,20 +126,13 @@ int sd_bus_new(sd_bus **ret);
 
 int sd_bus_set_address(sd_bus *bus, const char *address);
 int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
 int sd_bus_get_address(sd_bus *bus, const char **address);
-#endif // 0
 int sd_bus_set_bus_client(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_bus_client(sd_bus *bus);
-#endif // 0
 int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t bus_id);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_server(sd_bus *bus);
-#endif // 0
 int sd_bus_set_anonymous(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_anonymous(sd_bus *bus);
 int sd_bus_set_trusted(sd_bus *bus, int b);
 int sd_bus_is_trusted(sd_bus *bus);
@@ -149,16 +142,12 @@ int sd_bus_set_description(sd_bus *bus, const char *description);
 int sd_bus_get_description(sd_bus *bus, const char **description);
 int sd_bus_negotiate_creds(sd_bus *bus, int b, uint64_t creds_mask);
 int sd_bus_negotiate_timestamp(sd_bus *bus, int b);
-#endif // 0
 int sd_bus_negotiate_fds(sd_bus *bus, int b);
 int sd_bus_can_send(sd_bus *bus, char type);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_creds_mask(sd_bus *bus, uint64_t *creds_mask);
-#endif // 0
 int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_allow_interactive_authorization(sd_bus *bus);
-#endif // 0
+
 int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b);
 #if 0 /// UNNEEDED by elogind
 int sd_bus_get_exit_on_disconnect(sd_bus *bus);
@@ -173,7 +162,6 @@ sd_bus *sd_bus_ref(sd_bus *bus);
 sd_bus *sd_bus_unref(sd_bus *bus);
 sd_bus *sd_bus_flush_close_unref(sd_bus *bus);
 
-#if 0 /// UNNEEDED by elogind
 void sd_bus_default_flush_close(void);
 
 int sd_bus_is_open(sd_bus *bus);
@@ -181,31 +169,22 @@ int sd_bus_is_open(sd_bus *bus);
 int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id);
 int sd_bus_get_scope(sd_bus *bus, const char **scope);
 int sd_bus_get_tid(sd_bus *bus, pid_t *tid);
-#endif // 0
 int sd_bus_get_owner_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds **ret);
 
 int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie);
-#endif // 0
 int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *ret_error, sd_bus_message **reply);
 int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_fd(sd_bus *bus);
-#endif // 0
 int sd_bus_get_events(sd_bus *bus);
 int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec);
 int sd_bus_process(sd_bus *bus, sd_bus_message **r);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r);
-#endif // 0
 int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
 int sd_bus_flush(sd_bus *bus);
 
-#if 0 /// UNNEEDED by elogind
 sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus);
-#endif // 0
 sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
 sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus);
 void* sd_bus_get_current_userdata(sd_bus *bus);
@@ -214,25 +193,20 @@ int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority);
 int sd_bus_detach_event(sd_bus *bus);
 sd_event *sd_bus_get_event(sd_bus *bus);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata);
-#endif // 0
 int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *path, const char *interface, const sd_bus_vtable *vtable, void *userdata);
 int sd_bus_add_fallback_vtable(sd_bus *bus, sd_bus_slot **slot, const char *prefix, const char *interface, const sd_bus_vtable *vtable, sd_bus_object_find_t find, void *userdata);
 int sd_bus_add_node_enumerator(sd_bus *bus, sd_bus_slot **slot, const char *path, sd_bus_node_enumerator_t callback, void *userdata);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path);
-#endif // 0
 
 /* Slot object */
 
 sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot);
 sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot);
 
-#if 0 /// UNNEEDED by elogind
 sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot);
 void *sd_bus_slot_get_userdata(sd_bus_slot *slot);
 void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata);
@@ -242,7 +216,6 @@ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **description);
 sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot);
 sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus);
 void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot);
-#endif // 0
 
 /* Message object */
 
@@ -252,14 +225,11 @@ int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message **m);
 int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message **m, const sd_bus_error *e);
 int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message **m, const char *name, const char *format, ...) _sd_printf_(4, 5);
 int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message **m, int error, const sd_bus_error *e);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message **m, int error, const char *format, ...) _sd_printf_(4, 5);
-#endif // 0
 
 sd_bus_message* sd_bus_message_ref(sd_bus_message *m);
 sd_bus_message* sd_bus_message_unref(sd_bus_message *m);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
 int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
 int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
@@ -267,7 +237,6 @@ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
 
 int sd_bus_message_get_expect_reply(sd_bus_message *m);
 int sd_bus_message_get_auto_start(sd_bus_message *m);
-#endif // 0
 int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m);
 
 const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
@@ -279,11 +248,9 @@ const char *sd_bus_message_get_sender(sd_bus_message *m);
 const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m);
 int sd_bus_message_get_errno(sd_bus_message *m);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_realtime_usec(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t* seqnum);
-#endif // 0
 
 sd_bus* sd_bus_message_get_bus(sd_bus_message *m);
 sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */
@@ -291,34 +258,26 @@ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the r
 int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const char *member);
 int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member);
 int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_is_empty(sd_bus_message *m);
 int sd_bus_message_has_signature(sd_bus_message *m, const char *signature);
 
 int sd_bus_message_set_expect_reply(sd_bus_message *m, int b);
 int sd_bus_message_set_auto_start(sd_bus_message *m, int b);
 int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b);
-#endif // 0
 
 int sd_bus_message_set_destination(sd_bus_message *m, const char *destination);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
-#endif // 0
 
 int sd_bus_message_append(sd_bus_message *m, const char *types, ...);
 int sd_bus_message_appendv(sd_bus_message *m, const char *types, va_list ap);
 int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size);
-#endif // 0
 int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n);
 int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int memfd, uint64_t offset, uint64_t size);
 int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
 int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n);
 int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd, uint64_t offset, uint64_t size);
-#endif // 0
 int sd_bus_message_append_strv(sd_bus_message *m, char **l);
 int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_close_container(sd_bus_message *m);
@@ -332,10 +291,8 @@ int sd_bus_message_skip(sd_bus_message *m, const char *types);
 int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_exit_container(sd_bus_message *m);
 int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **contents);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_at_end(sd_bus_message *m, int complete);
-#endif // 0
 int sd_bus_message_rewind(sd_bus_message *m, int complete);
 
 /* Bus management */
@@ -345,31 +302,23 @@ int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags);
 int sd_bus_release_name(sd_bus *bus, const char *name);
 int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */
 int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds); /* unref the result! */
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine);
-#endif // 0
 
 /* Convenience calls */
 
 int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...);
-#endif // 0
 int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type);
 int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr);
 int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char ***ret); /* free the result! */
 int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, ...);
-#endif // 0
 
 int sd_bus_reply_method_return(sd_bus_message *call, const char *types, ...);
 int sd_bus_reply_method_error(sd_bus_message *call, const sd_bus_error *e);
 int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4);
 int sd_bus_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *e);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4);
-#endif // 0
 
 int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, ...);
 
@@ -377,9 +326,7 @@ int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const cha
 int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const char *interface, const char *name, ...) _sd_sentinel_;
 
 int sd_bus_emit_object_added(sd_bus *bus, const char *path);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_emit_object_removed(sd_bus *bus, const char *path);
-#endif // 0
 int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char **interfaces);
 int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_;
 int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **interfaces);
@@ -390,40 +337,30 @@ int sd_bus_query_sender_privilege(sd_bus_message *call, int capability);
 
 /* Credential handling */
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds_mask);
-#endif // 0
 sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c);
 sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c);
-#if 0 /// UNNEEDED by elogind
 uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c);
-#endif // 0
 uint64_t sd_bus_creds_get_augmented_mask(const sd_bus_creds *c);
 
 int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid);
-#endif // 0
 int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid);
 int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid);
 int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid);
 int sd_bus_creds_get_fsuid(sd_bus_creds *c, uid_t *fsuid);
 int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid);
-#endif // 0
 int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid);
 int sd_bus_creds_get_fsgid(sd_bus_creds *c, gid_t *fsgid);
 int sd_bus_creds_get_supplementary_gids(sd_bus_creds *c, const gid_t **gids);
 int sd_bus_creds_get_comm(sd_bus_creds *c, const char **comm);
 int sd_bus_creds_get_tid_comm(sd_bus_creds *c, const char **comm);
 int sd_bus_creds_get_exe(sd_bus_creds *c, const char **exe);
-#endif // 0
 int sd_bus_creds_get_cmdline(sd_bus_creds *c, char ***cmdline);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **cgroup);
+#if 0 /// unsupported by elogind
 int sd_bus_creds_get_unit(sd_bus_creds *c, const char **unit);
 int sd_bus_creds_get_slice(sd_bus_creds *c, const char **slice);
 int sd_bus_creds_get_user_unit(sd_bus_creds *c, const char **unit);
@@ -432,20 +369,16 @@ int sd_bus_creds_get_user_slice(sd_bus_creds *c, const char **slice);
 int sd_bus_creds_get_session(sd_bus_creds *c, const char **session);
 int sd_bus_creds_get_owner_uid(sd_bus_creds *c, uid_t *uid);
 int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability);
 int sd_bus_creds_has_inheritable_cap(sd_bus_creds *c, int capability);
 int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability);
-#endif // 0
 int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **context);
 int sd_bus_creds_get_audit_session_id(sd_bus_creds *c, uint32_t *sessionid);
 int sd_bus_creds_get_audit_login_uid(sd_bus_creds *c, uid_t *loginuid);
 int sd_bus_creds_get_tty(sd_bus_creds *c, const char **tty);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **name);
 int sd_bus_creds_get_well_known_names(sd_bus_creds *c, char ***names);
 int sd_bus_creds_get_description(sd_bus_creds *c, const char **name);
-#endif // 0
 
 /* Error structures */
 
@@ -493,12 +426,10 @@ int sd_bus_error_add_map(const sd_bus_error_map *map);
 
 /* Label escaping */
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_path_encode(const char *prefix, const char *external_id, char **ret_path);
 int sd_bus_path_encode_many(char **out, const char *path_template, ...);
 int sd_bus_path_decode(const char *path, const char *prefix, char **ret_external_id);
 int sd_bus_path_decode_many(const char *path, const char *path_template, ...);
-#endif // 0
 
 /* Tracking peers */
 
@@ -507,10 +438,8 @@ sd_bus_track* sd_bus_track_ref(sd_bus_track *track);
 sd_bus_track* sd_bus_track_unref(sd_bus_track *track);
 
 sd_bus* sd_bus_track_get_bus(sd_bus_track *track);
-#if 0 /// UNNEEDED by elogind
 void *sd_bus_track_get_userdata(sd_bus_track *track);
 void *sd_bus_track_set_userdata(sd_bus_track *track, void *userdata);
-#endif // 0
 
 int sd_bus_track_add_sender(sd_bus_track *track, sd_bus_message *m);
 int sd_bus_track_remove_sender(sd_bus_track *track, sd_bus_message *m);
index 959e2804caa66ed6fc77f1d6c690c190928bac5c..f698e92cc648aeb127905db6bba69f3598a4435b 100644 (file)
@@ -77,7 +77,6 @@ int sd_listen_fds(int unset_environment);
 
 int sd_listen_fds_with_names(int unset_environment, char ***names);
 
-#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is a FIFO in the file system stored under the
@@ -101,7 +100,6 @@ int sd_is_fifo(int fd, const char *path);
   See sd_is_special(3) for more information.
 */
 int sd_is_special(int fd, const char *path);
-#endif // 0
 
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
@@ -119,7 +117,6 @@ int sd_is_special(int fd, const char *path);
 */
 int sd_is_socket(int fd, int family, int type, int listening);
 
-#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is an Internet socket, of the specified family
@@ -162,6 +159,7 @@ int sd_is_socket_sockaddr(int fd, int type, const struct sockaddr* addr, unsigne
 */
 int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
 
+#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is a POSIX Message Queue of the specified name,
@@ -236,7 +234,6 @@ int sd_is_mq(int fd, const char *path);
 */
 int sd_notify(int unset_environment, const char *state);
 
-#if 0 /// UNNEEDED by elogind
 /*
   Similar to sd_notify() but takes a format string.
 
@@ -270,7 +267,6 @@ int sd_pid_notify(pid_t pid, int unset_environment, const char *state);
   process, if the appropriate permissions are available.
 */
 int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _sd_printf_(3,4);
-#endif // 0
 
 /*
   Similar to sd_pid_notify(), but also passes the specified fd array
index 95d9f37c26fe6c602b8babcbcca826674e1aa35d..f0e83cc93af5fefa285d9a8e2df319e0bceb9502 100644 (file)
@@ -98,65 +98,62 @@ int sd_event_exit(sd_event *e, int code);
 
 int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec);
 
-#if 0 /// UNNEEDED by elogind
 int sd_event_get_fd(sd_event *e);
-#endif // 0
 int sd_event_get_state(sd_event *e);
-#if 0 /// UNNEEDED by elogind
 int sd_event_get_tid(sd_event *e, pid_t *tid);
 int sd_event_get_exit_code(sd_event *e, int *code);
-#endif // 0
+
 int sd_event_set_watchdog(sd_event *e, int b);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_get_watchdog(sd_event *e);
-#endif // 0
+
 int sd_event_get_iteration(sd_event *e, uint64_t *ret);
 
-#if 0 /// UNNEEDED by elogind
+
 sd_event_source* sd_event_source_ref(sd_event_source *s);
-#endif // 0
+
 sd_event_source* sd_event_source_unref(sd_event_source *s);
 
 sd_event *sd_event_source_get_event(sd_event_source *s);
-#if 0 /// UNNEEDED by elogind
+
 void* sd_event_source_get_userdata(sd_event_source *s);
 void* sd_event_source_set_userdata(sd_event_source *s, void *userdata);
-#endif // 0
+
 
 int sd_event_source_set_description(sd_event_source *s, const char *description);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_description(sd_event_source *s, const char **description);
-#endif // 0
+
 int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_pending(sd_event_source *s);
-#endif // 0
+
 int sd_event_source_get_priority(sd_event_source *s, int64_t *priority);
 int sd_event_source_set_priority(sd_event_source *s, int64_t priority);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_enabled(sd_event_source *s, int *enabled);
-#endif // 0
+
 int sd_event_source_set_enabled(sd_event_source *s, int enabled);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_io_fd(sd_event_source *s);
-#endif // 0
+
 int sd_event_source_set_io_fd(sd_event_source *s, int fd);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events);
-#endif // 0
+
 int sd_event_source_set_io_events(sd_event_source *s, uint32_t events);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents);
-#endif // 0
+
 int sd_event_source_get_time(sd_event_source *s, uint64_t *usec);
 int sd_event_source_set_time(sd_event_source *s, uint64_t usec);
-#if 0 /// UNNEEDED by elogind
+
 int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec);
 int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec);
 int sd_event_source_get_time_clock(sd_event_source *s, clockid_t *clock);
 int sd_event_source_get_signal(sd_event_source *s);
 int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid);
-#endif // 0
+
 
 /* Define helpers so that __attribute__((cleanup(sd_event_unrefp))) and similar may be used. */
 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event, sd_event_unref);