Merge pull request #15406 from DaanDeMeyer/sd-bus-set-exec-docs
Add sd_bus_set_exec docs
This commit is contained in:
commit
92cad3f82d
|
@ -343,7 +343,7 @@ manpages = [
|
||||||
'sd_bus_request_name_async'],
|
'sd_bus_request_name_async'],
|
||||||
''],
|
''],
|
||||||
['sd_bus_send', '3', [], ''],
|
['sd_bus_send', '3', [], ''],
|
||||||
['sd_bus_set_address', '3', ['sd_bus_get_address'], ''],
|
['sd_bus_set_address', '3', ['sd_bus_get_address', 'sd_bus_set_exec'], ''],
|
||||||
['sd_bus_set_close_on_exit', '3', ['sd_bus_get_close_on_exit'], ''],
|
['sd_bus_set_close_on_exit', '3', ['sd_bus_get_close_on_exit'], ''],
|
||||||
['sd_bus_set_connected_signal', '3', ['sd_bus_get_connected_signal'], ''],
|
['sd_bus_set_connected_signal', '3', ['sd_bus_get_connected_signal'], ''],
|
||||||
['sd_bus_set_description',
|
['sd_bus_set_description',
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_bus_set_address</refname>
|
<refname>sd_bus_set_address</refname>
|
||||||
<refname>sd_bus_get_address</refname>
|
<refname>sd_bus_get_address</refname>
|
||||||
|
<refname>sd_bus_set_exec</refname>
|
||||||
|
|
||||||
<refpurpose>Set or query the address of the bus connection</refpurpose>
|
<refpurpose>Set or query the address of the bus connection</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
@ -30,15 +31,21 @@
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_set_address</function></funcdef>
|
<funcdef>int <function>sd_bus_set_address</function></funcdef>
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
<paramdef>const char* <parameter>address</parameter></paramdef>
|
<paramdef>const char *<parameter>address</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_get_address</function></funcdef>
|
<funcdef>int <function>sd_bus_get_address</function></funcdef>
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
<paramdef>const char** <parameter>address</parameter></paramdef>
|
<paramdef>const char **<parameter>address</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
|
<funcprototype>
|
||||||
|
<funcdef>int <function>sd_bus_set_exec</function></funcdef>
|
||||||
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
|
<paramdef>char *const *<parameter>argv</parameter></paramdef>
|
||||||
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -68,13 +75,13 @@
|
||||||
the rest is optional. <replaceable>family</replaceable> may be either <option>ipv4</option> or
|
the rest is optional. <replaceable>family</replaceable> may be either <option>ipv4</option> or
|
||||||
<option>ipv6</option>.</para>
|
<option>ipv6</option>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>An executable to spawn specified as
|
<para>An executable to spawn specified as
|
||||||
<literal>unixexec:guid=<replaceable>guid</replaceable>,path=<replaceable>path</replaceable>,argv1=<replaceable>argument</replaceable>,argv2=<replaceable>argument</replaceable>,...</literal>.
|
<literal>unixexec:guid=<replaceable>guid</replaceable>,path=<replaceable>path</replaceable>,argv1=<replaceable>argument</replaceable>,argv2=<replaceable>argument</replaceable>,...</literal>.
|
||||||
The <varname>path=</varname> key must be present, while <varname>guid=</varname> is optional.</para>
|
The <varname>path=</varname> key must be present, while <varname>guid=</varname> is optional.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A machine (container) to connect to specified as
|
<para>A machine (container) to connect to specified as
|
||||||
<literal>x-machine-unix:guid=<replaceable>guid</replaceable>,machine=<replaceable>machine</replaceable>,pid=<replaceable>pid</replaceable></literal>.
|
<literal>x-machine-unix:guid=<replaceable>guid</replaceable>,machine=<replaceable>machine</replaceable>,pid=<replaceable>pid</replaceable></literal>.
|
||||||
|
@ -104,6 +111,11 @@
|
||||||
automatically by
|
automatically by
|
||||||
<citerefentry><refentrytitle>sd_bus_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
|
<citerefentry><refentrytitle>sd_bus_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
|
||||||
similar calls, based on environment variables or built-in defaults.</para>
|
similar calls, based on environment variables or built-in defaults.</para>
|
||||||
|
|
||||||
|
<para><function>sd_bus_set_exec</function> is a shorthand function for setting a
|
||||||
|
<literal>unixexec</literal> address that spawns the given executable with the given arguments.
|
||||||
|
If <parameter>argv</parameter> is <constant>NULL</constant>, the given executable is spawned
|
||||||
|
without any extra arguments.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
|
|
|
@ -284,7 +284,7 @@ _public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) {
|
_public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const *argv) {
|
||||||
_cleanup_strv_free_ char **a = NULL;
|
_cleanup_strv_free_ char **a = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ int sd_bus_new(sd_bus **ret);
|
||||||
|
|
||||||
int sd_bus_set_address(sd_bus *bus, const char *address);
|
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);
|
int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd);
|
||||||
int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
|
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);
|
int sd_bus_get_address(sd_bus *bus, const char **address);
|
||||||
int sd_bus_set_bus_client(sd_bus *bus, int b);
|
int sd_bus_set_bus_client(sd_bus *bus, int b);
|
||||||
int sd_bus_is_bus_client(sd_bus *bus);
|
int sd_bus_is_bus_client(sd_bus *bus);
|
||||||
|
|
Loading…
Reference in New Issue