summaryrefslogtreecommitdiffstats
path: root/man/sd_bus_error.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-22 18:24:43 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-24 19:48:22 +0200
commit2b07ec316a0e25a3e10c270c7f6baee9e0187bf8 (patch)
tree01bd72e78165d24c17f28aa65ba1bd38fe830dde /man/sd_bus_error.xml
parentMerge pull request #16808 from yuwata/test-network-reconfigure-routing-policy... (diff)
downloadsystemd-2b07ec316a0e25a3e10c270c7f6baee9e0187bf8.tar.xz
systemd-2b07ec316a0e25a3e10c270c7f6baee9e0187bf8.zip
sd-bus: add a variant of sd_bus_error_has_name() that takes multiple names
Diffstat (limited to 'man/sd_bus_error.xml')
-rw-r--r--man/sd_bus_error.xml27
1 files changed, 22 insertions, 5 deletions
diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml
index 8616f7ee43..3ce375bb2b 100644
--- a/man/sd_bus_error.xml
+++ b/man/sd_bus_error.xml
@@ -31,6 +31,8 @@
<refname>sd_bus_error_move</refname>
<refname>sd_bus_error_is_set</refname>
<refname>sd_bus_error_has_name</refname>
+ <refname>sd_bus_error_has_names_sentinel</refname>
+ <refname>sd_bus_error_has_names</refname>
<refpurpose>sd-bus error handling</refpurpose>
</refnamediv>
@@ -128,6 +130,16 @@
<paramdef>const sd_bus_error *<parameter>e</parameter></paramdef>
<paramdef>const char *<parameter>name</parameter></paramdef>
</funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_bus_error_has_names_sentinel</function></funcdef>
+ <paramdef>const sd_bus_error *<parameter>e</parameter></paramdef>
+ <paramdef>...</paramdef>
+ </funcprototype>
+
+ <para>
+ &#35;define sd_bus_error_has_names(e, ...) sd_bus_error_has_names_sentinel(e, ..., NULL)
+ </para>
</funcsynopsis>
</refsynopsisdiv>
@@ -268,6 +280,12 @@
<parameter>name</parameter> has been set,
<constant>false</constant> otherwise.</para>
+ <para><function>sd_bus_error_has_names_sentinel()</function> is similar to
+ <function>sd_bus_error_has_name()</function>, but takes multiple names to check against. The list must be
+ terminated with <constant>NULL</constant>. <function>sd_bus_error_has_names()</function>
+ is a macro wrapper around <function>sd_bus_error_has_names_sentinel()</function> that adds the
+ <constant>NULL</constant> sentinel automatically.</para>
+
<para><function>sd_bus_error_free()</function> will destroy
resources held by <parameter>e</parameter>. The parameter itself
will not be deallocated, and must be <citerefentry
@@ -307,11 +325,10 @@
<structfield>name</structfield> field are
non-<constant>NULL</constant>, zero otherwise.</para>
- <para><function>sd_bus_error_has_name()</function> returns a
- non-zero value when <parameter>e</parameter> is
- non-<constant>NULL</constant> and the
- <structfield>name</structfield> field is equal to
- <parameter>name</parameter>, zero otherwise.</para>
+ <para><function>sd_bus_error_has_name()</function>, <function>sd_bus_error_has_names()</function>, and
+ <function>sd_bus_error_has_names_sentinel()</function> return a non-zero value when <parameter>e</parameter> is
+ non-<constant>NULL</constant> and the <structfield>name</structfield> field is equal to one of the given
+ names, zero otherwise.</para>
</refsect1>
<refsect1>