sensor:modalias:acpi:KIOX000A*:dmi:*:svnEVE*:pnEveV:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
+#########################################
+# Geo Computers
+#########################################
+
+# Geoflex
+sensor:modalias:acpi:KIOX010A*:dmi:*:svnGEO*:pnGeoFlex*:*
+ ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
+
#########################################
# Google Chromebooks
#########################################
'sd_bus_call_method_asyncv',
'sd_bus_call_methodv'],
''],
+ ['sd_bus_can_send', '3', [], ''],
['sd_bus_close', '3', ['sd_bus_default_flush_close', 'sd_bus_flush'], ''],
['sd_bus_creds_get_pid',
'3',
'3',
['sd_bus_get_method_call_timeout'],
''],
+ ['sd_bus_set_property',
+ '3',
+ ['sd_bus_get_property',
+ 'sd_bus_get_property_string',
+ 'sd_bus_get_property_strv',
+ 'sd_bus_get_property_trivial',
+ 'sd_bus_set_propertyv'],
+ ''],
['sd_bus_set_sender', '3', ['sd_bus_get_sender'], ''],
['sd_bus_set_watch_bind', '3', ['sd_bus_get_watch_bind'], ''],
['sd_bus_slot_get_bus',
<citerefentry><refentrytitle>sd_bus_call_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call_method_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_can_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_close</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_dump</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_message_get_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_message_get_property_trivial</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_message_get_property_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_message_get_property_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_signature</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_connected_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_method_call_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_set_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+<citerefentry><refentrytitle>sd_bus_set_propertyv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_set_watch_bind</refentrytitle><manvolnum>3</manvolnum></citerefentry>
<citerefentry><refentrytitle>sd_bus_set_close_on_exit</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_new_method_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>sd_bus_call_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>sd_bus_set_property</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
</para>
</refsect1>
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+
+<refentry id="sd_bus_can_send"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <refentryinfo>
+ <title>sd_bus_can_send</title>
+ <productname>systemd</productname>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>sd_bus_can_send</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>sd_bus_can_send</refname>
+
+ <refpurpose>Check which types can be sent over a bus object</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
+
+ <funcprototype>
+ <funcdef>void <function>sd_bus_can_send</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>char <parameter>type</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><function>sd_bus_can_send</function> is mostly used for checking if file descriptor
+ passing is available on the given bus. <parameter>type</parameter> can be any of the
+ <constant>SD_BUS_TYPE</constant> constants.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Return Value</title>
+
+ <para>On failure, <function>sd_bus_can_send()</function> returns a negative errno-style error
+ code. If values of the given type can be sent over the given bus, it returns a positive integer.
+ Otherwise, it returns zero.</para>
+
+ <refsect2>
+ <title>Errors</title>
+
+ <para>Returned errors may indicate the following problems:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><constant>-ENOPKG</constant></term>
+
+ <listitem><para>The bus object <parameter>bus</parameter> could not be resolved.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><constant>-ENOTCONN</constant></term>
+
+ <listitem><para>The input parameter <parameter>bus</parameter> is
+ <constant>NULL</constant> or the bus is not connected.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><constant>-ECHILD</constant></term>
+
+ <listitem><para>The bus object <parameter>bus</parameter> was created in a different
+ process.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+ </refsect1>
+
+ <xi:include href="libsystemd-pkgconfig.xml" />
+
+ <refsect1>
+ <title>See Also</title>
+
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>
<refsect1>
<title>Description</title>
- <para><function>sd_bus_close()</function> disconnects the specified bus connection. When this call is invoked and
- the specified bus object refers to an active connection it is immediately terminated. No further messages may be
- sent or received on it. Any messages queued in the bus object (both incoming and outgoing) are released. If
- invoked on <constant>NULL</constant> bus object or when the bus connection is already closed this function executes
- no operation. This call does not free or unreference the bus object itself. Use
- <citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> for that.</para>
-
- <para><function>sd_bus_flush()</function> synchronously writes out all outgoing queued message on a bus connection
- if there are any. This function call may block if the peer is not processing bus messages quickly.</para>
+ <para><function>sd_bus_close()</function> disconnects the specified bus connection. When this
+ call is invoked and the specified bus object refers to an active connection it is immediately
+ terminated. No further messages may be sent or received on it. Any messages queued in the bus
+ object (both incoming and outgoing) are released. If invoked on <constant>NULL</constant> bus
+ object or when the bus connection is already closed this function executes no operation. This
+ call does not free or unreference the bus object itself. Use
+ <citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ for that.</para>
+
+ <para><function>sd_bus_flush()</function> synchronously writes out all outgoing queued message
+ on a bus connection if there are any. This function call may block if the peer is not processing
+ bus messages quickly.</para>
<para>Before a program exits it is usually a good idea to flush any pending messages with
- <function>sd_bus_flush()</function> and then close connections with <function>sd_bus_close()</function> to ensure
- that no unwritten messages are lost, no further messages may be queued and all incoming but unprocessed messages
- are released. After both operations have been done, it is a good idea to also drop any remaining references to the
- bus object so that it may be freed. Since these three operations are frequently done together a helper call
- <citerefentry><refentrytitle>sd_bus_flush_close_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> is
- provided that combines them into one.</para>
+ <function>sd_bus_flush()</function> and then close connections with
+ <function>sd_bus_close()</function> to ensure that no unwritten messages are lost, no further
+ messages may be queued and all incoming but unprocessed messages are released. After both
+ operations have been done, it is a good idea to also drop any remaining references to the bus
+ object so that it may be freed. Since these three operations are frequently done together a
+ helper call
+ <citerefentry><refentrytitle>sd_bus_flush_close_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ is provided that combines them into one.</para>
<para><function>sd_bus_default_flush_close()</function> is similar to
- <function>sd_bus_flush_close_unref</function>, but does not take a bus pointer argument and instead
- iterates over any of the "default" busses opened by
+ <function>sd_bus_flush_close_unref</function>, but does not take a bus pointer argument and
+ instead iterates over any of the "default" busses opened by
<citerefentry><refentrytitle>sd_bus_default</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- and similar calls. <function>sd_bus_default_flush_close()</function> is particularly useful to clean up
- any busses opened using those calls before the program exits.</para>
+ and similar calls. <function>sd_bus_default_flush_close()</function> is particularly useful to
+ clean up any busses opened using those calls before the program exits.</para>
</refsect1>
<refsect1>
<title>Return Value</title>
- <para>On success, <function>sd_bus_flush()</function> returns 0 or a positive integer. On failure, it returns a
- negative errno-style error code.</para>
+ <para>On success, <function>sd_bus_flush()</function> returns a non-negative integer. On
+ failure, it returns a negative errno-style error code.</para>
<refsect2>
<title>Errors</title>
<varlistentry>
<term><constant>-ECHILD</constant></term>
- <listitem><para>The bus connection has been created in a different process.</para></listitem>
+ <listitem><para>The bus connection has been created in a different process.</para>
+ </listitem>
</varlistentry>
</variablelist>
</refsect2>
dictionary entries, followed by a pair of values for each entry matching the element type of the
dictionary entries.</para>
- <para>The <function>sd_bus_message_appendv()</function> is equivalent to the
+ <para><function>sd_bus_message_appendv()</function> is equivalent to
<function>sd_bus_message_append()</function>, except that it is called with a
<literal>va_list</literal> instead of a variable number of arguments. This function does not
call the <function>va_end()</function> macro. Because it invokes the
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+
+<refentry id="sd_bus_set_property"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <refentryinfo>
+ <title>sd_bus_set_property</title>
+ <productname>systemd</productname>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>sd_bus_set_property</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>sd_bus_set_property</refname>
+ <refname>sd_bus_set_propertyv</refname>
+ <refname>sd_bus_get_property</refname>
+ <refname>sd_bus_get_property_trivial</refname>
+ <refname>sd_bus_get_property_string</refname>
+ <refname>sd_bus_get_property_strv</refname>
+
+ <refpurpose>Set or query D-Bus service properties</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_set_property</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
+ <paramdef>const char *<parameter>type</parameter></paramdef>
+ <paramdef>...</paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_set_propertyv</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
+ <paramdef>const char *<parameter>type</parameter></paramdef>
+ <paramdef>va_list <parameter>ap</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_get_property</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
+ <paramdef>const char *<parameter>type</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_get_property_trivial</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>char <parameter>type</parameter></paramdef>
+ <paramdef>void *<parameter>ret_ptr</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_get_property_string</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>char **<parameter>ret</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_get_property_strv</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>const char *<parameter>destination</parameter></paramdef>
+ <paramdef>const char *<parameter>path</parameter></paramdef>
+ <paramdef>const char *<parameter>interface</parameter></paramdef>
+ <paramdef>const char *<parameter>member</parameter></paramdef>
+ <paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
+ <paramdef>char ***<parameter>ret</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>These functions set or query D-Bus properties. D-Bus properties are service fields exposed
+ via the <constant>org.freedesktop.DBus.Properties</constant> interface. Under the hood, these
+ functions call methods of the <constant>org.freedesktop.DBus.Properties</constant> interface and
+ as a result their semantics are similar to
+ <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+ </para>
+
+ <para><function>sd_bus_set_property()</function> sets a D-Bus property. On success, the response
+ is stored in <parameter>reply</parameter>. If setting the property fails or an internal error
+ occurs, an error is returned and an extended description of the error is optionally stored in
+ <parameter>ret_error</parameter> if it is not <constant>NULL</constant>.
+ <parameter>type</parameter> and the arguments that follow it describe the new value of the
+ property and must follow the format described in
+ <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+ </para>
+
+ <para><function>sd_bus_set_propertyv()</function> is equivalent to
+ <function>sd_bus_set_property()</function>, except that it is called with a
+ <literal>va_list</literal> instead of a variable number of arguments.</para>
+
+ <para><function>sd_bus_get_property()</function> queries a D-Bus property. If retrieving the
+ property fails or an internal error occurs, an error is returned and an extended description of
+ the error is optionally stored in <parameter>ret_error</parameter> if it is not
+ <constant>NULL</constant>. On success, the property is stored in <parameter>reply</parameter>.
+ <parameter>type</parameter> describes the property type and must follow the format described in
+ <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+ </para>
+
+ <para><function>sd_bus_get_property_trivial()</function>,
+ <function>sd_bus_get_property_string()</function> and
+ <function>sd_bus_get_property_strv()</function> are shorthands for
+ <function>sd_bus_get_property()</function> that are used to query basic, string and string
+ vector properties respectively. The caller is responsible for freeing the string and string
+ vector results stored in <parameter>ret</parameter> by
+ <function>sd_bus_get_property_string()</function> and
+ <function>sd_bus_get_property_strv()</function>.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Return Value</title>
+
+ <para>On success, these functions return a non-negative integer. On failure, they return a
+ negative errno-style error code.</para>
+
+ <refsect2 id='errors'>
+ <title>Errors</title>
+
+ <para>See the
+ <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ man page for a list of possible errors</para>
+ </refsect2>
+ </refsect1>
+
+ <xi:include href="libsystemd-pkgconfig.xml" />
+
+ <refsect1>
+ <title>See Also</title>
+
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>
if (!MANAGER_IS_SYSTEM(u->manager))
return 0;
+ /* For the following three directory types we need write access, and /var/ is possibly on the root
+ * fs. Hence order after systemd-remount-fs.service, to ensure things are writable. */
+ if (!strv_isempty(c->directories[EXEC_DIRECTORY_STATE].paths) ||
+ !strv_isempty(c->directories[EXEC_DIRECTORY_CACHE].paths) ||
+ !strv_isempty(c->directories[EXEC_DIRECTORY_LOGS].paths)) {
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_REMOUNT_FS_SERVICE, true, UNIT_DEPENDENCY_FILE);
+ if (r < 0)
+ return r;
+ }
+
if (c->private_tmp) {
const char *p;
EXPORT_FORMAT_MINIMAL, /* also strip signature */
} arg_export_format = EXPORT_FORMAT_FULL;
+static const BusLocator home_mgr = {
+ .destination = "org.freedesktop.home1",
+ .path = "/org/freedesktop/home1",
+ .interface = "org.freedesktop.home1.Manager",
+};
+
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_this_machine, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_privileged, json_variant_unrefp);
if (r < 0)
return r;
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ListHomes",
- &error,
- &reply,
- NULL);
+ r = bus_call_method(bus, &home_mgr, "ListHomes", &error, &reply, NULL);
if (r < 0)
return log_error_errno(r, "Failed to list homes: %s", bus_error_message(&error, r));
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ActivateHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ActivateHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "DeactivateHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "DeactivateHome");
if (r < 0)
return bus_log_create_error(r);
continue;
}
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "GetUserRecordByName",
- &error,
- &reply,
- "s",
- *i);
+ r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", *i);
} else {
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "GetUserRecordByUID",
- &error,
- &reply,
- "u",
- (uint32_t) uid);
+ r = bus_call_method(bus, &home_mgr, "GetUserRecordByUID", &error, &reply, "u", (uint32_t) uid);
}
if (r < 0) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "AuthenticateHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "AuthenticateHome");
if (r < 0)
return bus_log_create_error(r);
if (r < 0)
return r;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "CreateHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "CreateHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "RemoveHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "RemoveHome");
if (r < 0)
return bus_log_create_error(r);
if (!identity_properties_specified())
return log_error_errno(SYNTHETIC_ERRNO(EALREADY), "No field to change specified.");
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "GetUserRecordByName",
- &error,
- &reply,
- "s",
- username);
+ r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
if (r < 0)
return log_error_errno(r, "Failed to acquire user home record: %s", bus_error_message(&error, r));
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_free_ char *formatted = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "UpdateHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "UpdateHome");
if (r < 0)
return bus_log_create_error(r);
log_debug("Resizing");
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ResizeHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
if (r < 0)
return bus_log_create_error(r);
log_debug("Propagating password");
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ResizeHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "LockHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "LockHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "UnlockHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "UnlockHome");
if (r < 0)
return bus_log_create_error(r);
return log_oom();
for (;;) {
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "AcquireHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "AcquireHome");
if (r < 0)
return bus_log_create_error(r);
}
}
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "GetHomeByName",
- &error,
- &reply,
- "s",
- argv[1]);
+ r = bus_call_method(bus, &home_mgr, "GetHomeByName", &error, &reply, "s", argv[1]);
if (r < 0)
return log_error_errno(r, "Failed to inspect home: %s", bus_error_message(&error, r));
/* Close the fd that pings the home now. */
acquired_fd = safe_close(acquired_fd);
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ReleaseHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
if (r < 0)
return bus_log_create_error(r);
if (r < 0)
return r;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "LockAllHomes");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "LockAllHomes");
if (r < 0)
return bus_log_create_error(r);
#include "sd-bus.h"
#include "bus-common-errors.h"
+#include "bus-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "home-util.h"
#define USER_RECORD_IS_HOMED INT_TO_PTR(1)
#define USER_RECORD_IS_OTHER INT_TO_PTR(2)
+static const BusLocator home_mgr = {
+ .destination = "org.freedesktop.home1",
+ .path = "/org/freedesktop/home1",
+ .interface = "org.freedesktop.home1.Manager",
+};
+
static int parse_argv(
pam_handle_t *handle,
int argc, const char **argv,
if (r != PAM_SUCCESS)
return r;
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "GetUserRecordByName",
- &error,
- &reply,
- "s",
- username);
+ r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
if (r < 0) {
if (sd_bus_error_has_name(&error, SD_BUS_ERROR_SERVICE_UNKNOWN) ||
sd_bus_error_has_name(&error, SD_BUS_ERROR_NAME_HAS_NO_OWNER)) {
}
}
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- do_auth ? "AcquireHome" : "RefHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, do_auth ? "AcquireHome" : "RefHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
if (r != PAM_SUCCESS)
return r;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ReleaseHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = sd_bus_message_new_method_call(
- bus,
- &m,
- "org.freedesktop.home1",
- "/org/freedesktop/home1",
- "org.freedesktop.home1.Manager",
- "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
udev_good=0
udev_total=0
-for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv sd_bus_try_close | sort -u` ; do
+deprecated="
+ -e sd_bus_try_close
+ -e sd_bus_process_priority
+ -e sd_bus_message_get_priority
+ -e sd_bus_message_set_priority
+"
+
+for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv $deprecated | sort -u` ; do
if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
echo "✓ Symbol $symbol() is documented."
good=1
Documentation=man:systemd-backlight@.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
-After=systemd-remount-fs.service
Before=sysinit.target shutdown.target
[Service]
Documentation=man:systemd-coredump(8)
DefaultDependencies=no
Conflicts=shutdown.target
-After=systemd-remount-fs.service systemd-journald.socket
+After=systemd-journald.socket
Requires=systemd-journald.socket
Before=shutdown.target
ConditionDirectoryNotEmpty=/sys/fs/pstore
ConditionVirtualization=!container
DefaultDependencies=no
-Wants=systemd-remount-fs.service
-After=systemd-remount-fs.service
+Conflicts=shutdown.target
+Before=sysinit.target shutdown.target
[Service]
Type=oneshot
StateDirectory=systemd/pstore
[Install]
-WantedBy=systemd-remount-fs.service
+WantedBy=sysinit.target
DefaultDependencies=no
BindsTo=sys-devices-virtual-misc-rfkill.device
Conflicts=shutdown.target
-After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service
+After=sys-devices-virtual-misc-rfkill.device
Before=shutdown.target
[Service]
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
-After=systemd-remount-fs.service systemd-sysusers.service
+After=systemd-sysusers.service
Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-set.target time-sync.target