diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-26 14:59:52 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-26 15:08:42 -0400 |
commit | 8f077bf94e129fa1b6f0159e3140c4326f1066cf (patch) | |
tree | 86e09f4e9720253c641a00cd6619b6ec0493524b /src/core/busname.c | |
parent | 4aa4d2ae9717d0f8656528a3197bbc0c256380b1 (diff) |
Print kdbus path when opening fails
This makes it easier to debug what is going on.
Diffstat (limited to 'src/core/busname.c')
-rw-r--r-- | src/core/busname.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/busname.c b/src/core/busname.c index b3f7e0d5d5..39ea6a0d93 100644 --- a/src/core/busname.c +++ b/src/core/busname.c @@ -290,14 +290,19 @@ static int busname_watch_fd(BusName *n) { } static int busname_open_fd(BusName *n) { + _cleanup_free_ char *path = NULL; + const char *mode; + assert(n); if (n->starter_fd >= 0) return 0; - n->starter_fd = bus_kernel_open_bus_fd(UNIT(n)->manager->running_as == SYSTEMD_SYSTEM ? "system" : "user"); + mode = UNIT(n)->manager->running_as == SYSTEMD_SYSTEM ? "system" : "user"; + n->starter_fd = bus_kernel_open_bus_fd(mode, &path); if (n->starter_fd < 0) { - log_warning_unit(UNIT(n)->id, "Failed to create starter fd: %s", strerror(-n->starter_fd)); + log_warning_unit(UNIT(n)->id, "Failed to open %s: %s", + path ?: "kdbus", strerror(-n->starter_fd)); return n->starter_fd; } |