summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-29 21:38:01 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-29 21:43:56 +0100
commit33322185554799b08e94aca036dd109aaee52408 (patch)
treef365f14e3873be4a0e7ae496bf88567dd9294ea8 /src
parentbus-util: retrieve bus error from message (diff)
downloadsystemd-33322185554799b08e94aca036dd109aaee52408.tar.xz
systemd-33322185554799b08e94aca036dd109aaee52408.zip
core/unit: use bus_error_message() at one more place
Diffstat (limited to 'src')
-rw-r--r--src/core/unit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 046e376b8a..2cddc924f3 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3462,8 +3462,12 @@ static int get_name_owner_handler(sd_bus_message *message, void *userdata, sd_bu
e = sd_bus_message_get_error(message);
if (e) {
- if (!sd_bus_error_has_name(e, "org.freedesktop.DBus.Error.NameHasNoOwner"))
- log_unit_error(u, "Unexpected error response from GetNameOwner(): %s", e->message);
+ if (!sd_bus_error_has_name(e, "org.freedesktop.DBus.Error.NameHasNoOwner")) {
+ r = sd_bus_error_get_errno(e);
+ log_unit_error_errno(u, r,
+ "Unexpected error response from GetNameOwner(): %s",
+ bus_error_message(e, r));
+ }
new_owner = NULL;
} else {