summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index c191336c0e..01a6ff806e 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -965,13 +965,16 @@ static const char *automount_sub_state_to_string(Unit *u) {
return automount_state_to_string(AUTOMOUNT(u)->state);
}
-static bool automount_check_gc(Unit *u) {
+static bool automount_may_gc(Unit *u) {
+ Unit *t;
+
assert(u);
- if (!UNIT_TRIGGER(u))
- return false;
+ t = UNIT_TRIGGER(u);
+ if (!t)
+ return true;
- return UNIT_VTABLE(UNIT_TRIGGER(u))->check_gc(UNIT_TRIGGER(u));
+ return UNIT_VTABLE(t)->may_gc(t);
}
static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, void *userdata) {
@@ -1124,7 +1127,7 @@ const UnitVTable automount_vtable = {
.active_state = automount_active_state,
.sub_state_to_string = automount_sub_state_to_string,
- .check_gc = automount_check_gc,
+ .may_gc = automount_may_gc,
.trigger_notify = automount_trigger_notify,