summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-29 16:05:32 +0200
committerTom Gundersen <teg@jklm.no>2015-04-29 17:08:31 +0200
commit7dfbe2e3fc0215b49d8202a32beb6b1aae08c4e4 (patch)
treea4916772973c4a6053f5eec7492b273304e473e5 /src/core/automount.c
parent77cfd1139cd116e9761aacfaf8c3cde71fc5d058 (diff)
core: annotate event sources
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 6fc214b704..b1109bd67c 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -274,12 +274,13 @@ static int automount_coldplug(Unit *u) {
if (a->deserialized_state == AUTOMOUNT_WAITING ||
a->deserialized_state == AUTOMOUNT_RUNNING) {
-
assert(a->pipe_fd >= 0);
r = sd_event_add_io(u->manager->event, &a->pipe_event_source, a->pipe_fd, EPOLLIN, automount_dispatch_io, u);
if (r < 0)
return r;
+
+ (void) sd_event_source_set_description(a->pipe_event_source, "automount-io");
}
automount_set_state(a, a->deserialized_state);
@@ -595,6 +596,8 @@ static void automount_enter_waiting(Automount *a) {
if (r < 0)
goto fail;
+ (void) sd_event_source_set_description(a->pipe_event_source, "automount-io");
+
a->pipe_fd = p[0];
a->dev_id = st.st_dev;
@@ -683,11 +686,17 @@ static int automount_start_expire(Automount *a) {
return sd_event_source_set_enabled(a->expire_event_source, SD_EVENT_ONESHOT);
}
- return sd_event_add_time(
+ r = sd_event_add_time(
UNIT(a)->manager->event,
&a->expire_event_source,
CLOCK_MONOTONIC, timeout, 0,
automount_dispatch_expire, a);
+ if (r < 0)
+ return r;
+
+ (void) sd_event_source_set_description(a->expire_event_source, "automount-expire");
+
+ return 0;
}
static void automount_enter_runnning(Automount *a) {