summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index 48cc0459ed..94db122633 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -291,13 +291,15 @@ static int busname_watch_fd(BusName *n) {
r = sd_event_source_set_enabled(n->starter_event_source, SD_EVENT_ON);
else
r = sd_event_add_io(UNIT(n)->manager->event, &n->starter_event_source, n->starter_fd, EPOLLIN, busname_dispatch_io, n);
- (void) sd_event_source_set_description(n->starter_event_source, "busname-starter");
+
if (r < 0) {
log_unit_warning_errno(UNIT(n)->id, r, "Failed to watch starter fd: %m");
busname_unwatch_fd(n);
return r;
}
+ (void) sd_event_source_set_description(n->starter_event_source, "busname-starter");
+
return 0;
}