diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-14 12:15:58 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-14 18:28:30 +0200 |
commit | ab4a88eb920e2f64a79a60c1ea9aecb7907a9635 (patch) | |
tree | a6e19b63960b0ec77ee06159e22a57dda28d45e7 /man/sd_bus_default.xml | |
parent | 165fee860a384b2e1ea4317551bc4463b3d53b61 (diff) | |
download | systemd-ab4a88eb920e2f64a79a60c1ea9aecb7907a9635.tar.gz |
sd-bus: add custom return code when $XDG_RUNTIME_DIR is not set
We would return ENOENT, which is extremely confusing. Strace is not helpful because
no *file* is actually missing. So let's add some logs at debug level and also use
a custom return code. Let all user-facing utilities print a custom error message
in that case.
Diffstat (limited to 'man/sd_bus_default.xml')
-rw-r--r-- | man/sd_bus_default.xml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/man/sd_bus_default.xml b/man/sd_bus_default.xml index 06ce1386ac..c218768346 100644 --- a/man/sd_bus_default.xml +++ b/man/sd_bus_default.xml @@ -276,7 +276,6 @@ <para>Returned errors may indicate the following problems:</para> <variablelist> - <varlistentry> <term><constant>-EINVAL</constant></term> @@ -284,6 +283,14 @@ </varlistentry> <varlistentry> + <term><constant>-ENOMEDIUM</constant></term> + + <listitem><para>The requested bus type is not available because of invalid environment (for example + the user session bus is not available because <varname>$XDG_RUNTIME_DIR</varname> is not set). + </para></listitem> + </varlistentry> + + <varlistentry> <term><constant>-ENOMEM</constant></term> <listitem><para>Memory allocation failed.</para></listitem> |