chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gitignore: ignore files ending in ~
[elogind.git]
/
automount.c
diff --git
a/automount.c
b/automount.c
index 7aa55b4f9f0999ca4fc86a0234031d9b776ff9fb..cab7164a5def16d910249ece2f6d9239709da85c 100644
(file)
--- a/
automount.c
+++ b/
automount.c
@@
-149,7
+149,7
@@
static int automount_load(Unit *u) {
if ((r = unit_load_related_unit(u, ".mount", (Unit**) &a->mount)) < 0)
return r;
if ((r = unit_load_related_unit(u, ".mount", (Unit**) &a->mount)) < 0)
return r;
- if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(a->mount))) < 0)
+ if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(a->mount)
, true
)) < 0)
return r;
}
return r;
}
@@
-168,7
+168,7
@@
static void automount_set_state(Automount *a, AutomountState state) {
unmount_autofs(a);
if (state != old_state)
unmount_autofs(a);
if (state != old_state)
- log_debug("%s changed %s
→
%s",
+ log_debug("%s changed %s
->
%s",
UNIT(a)->meta.id,
automount_state_to_string(old_state),
automount_state_to_string(state));
UNIT(a)->meta.id,
automount_state_to_string(old_state),
automount_state_to_string(state));
@@
-640,13
+640,20
@@
static const char *automount_sub_state_to_string(Unit *u) {
return automount_state_to_string(AUTOMOUNT(u)->state);
}
return automount_state_to_string(AUTOMOUNT(u)->state);
}
+static bool automount_check_gc(Unit *u) {
+ Automount *a = AUTOMOUNT(u);
+
+ assert(a);
+
+ return UNIT_VTABLE(UNIT(a->mount))->check_gc(UNIT(a->mount));
+}
+
static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
+ Automount *a = AUTOMOUNT(u);
union autofs_v5_packet_union packet;
ssize_t l;
int r;
union autofs_v5_packet_union packet;
ssize_t l;
int r;
- Automount *a = AUTOMOUNT(u);
-
assert(a);
assert(fd == a->pipe_fd);
assert(a);
assert(fd == a->pipe_fd);
@@
-729,6
+736,8
@@
const UnitVTable automount_vtable = {
.active_state = automount_active_state,
.sub_state_to_string = automount_sub_state_to_string,
.active_state = automount_active_state,
.sub_state_to_string = automount_sub_state_to_string,
+ .check_gc = automount_check_gc,
+
.fd_event = automount_fd_event,
.bus_message_handler = bus_automount_message_handler,
.fd_event = automount_fd_event,
.bus_message_handler = bus_automount_message_handler,