chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: highlight questions, so that they cannot be overseen in other log spew
[elogind.git]
/
mount.c
diff --git
a/mount.c
b/mount.c
index 187c6a373a2888de4761bbd31c71b2ed7531a740..55f11341a6bd03b9f134b2766721fd397a38d1d7 100644
(file)
--- a/
mount.c
+++ b/
mount.c
@@
-144,15
+144,15
@@
static int mount_add_node_links(Mount *m) {
if (r < 0)
return r;
if (r < 0)
return r;
- if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, device)) < 0)
+ if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, device
, true
)) < 0)
return r;
return r;
- if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, device)) < 0)
+ if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, device
, true
)) < 0)
return r;
if (UNIT(m)->meta.manager->running_as == MANAGER_INIT ||
UNIT(m)->meta.manager->running_as == MANAGER_SYSTEM)
return r;
if (UNIT(m)->meta.manager->running_as == MANAGER_INIT ||
UNIT(m)->meta.manager->running_as == MANAGER_SYSTEM)
- if ((r = unit_add_dependency(device, UNIT_WANTS, UNIT(m))) < 0)
+ if ((r = unit_add_dependency(device, UNIT_WANTS, UNIT(m)
, false
)) < 0)
return r;
return 0;
return r;
return 0;
@@
-180,20
+180,20
@@
static int mount_add_path_links(Mount *m) {
if (path_startswith(m->where, n->where)) {
if (path_startswith(m->where, n->where)) {
- if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(other))) < 0)
+ if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(other)
, true
)) < 0)
return r;
if (n->from_etc_fstab || n->from_fragment)
return r;
if (n->from_etc_fstab || n->from_fragment)
- if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(other))) < 0)
+ if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(other)
, true
)) < 0)
return r;
} else if (path_startswith(n->where, m->where)) {
return r;
} else if (path_startswith(n->where, m->where)) {
- if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(other))) < 0)
+ if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(other)
, true
)) < 0)
return r;
if (m->from_etc_fstab || m->from_fragment)
return r;
if (m->from_etc_fstab || m->from_fragment)
- if ((r = unit_add_dependency(UNIT(other), UNIT_REQUIRES, UNIT(m))) < 0)
+ if ((r = unit_add_dependency(UNIT(other), UNIT_REQUIRES, UNIT(m)
, true
)) < 0)
return r;
}
}
return r;
}
}
@@
-256,18
+256,18
@@
static int mount_add_target_links(Mount *m) {
if ((r = unit_load_related_unit(UNIT(m), ".automount", &am)) < 0)
return r;
if ((r = unit_load_related_unit(UNIT(m), ".automount", &am)) < 0)
return r;
- if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(am))) < 0)
+ if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(am)
, true
)) < 0)
return r;
return r;
- return unit_add_dependency(UNIT(am), UNIT_BEFORE, tu);
+ return unit_add_dependency(UNIT(am), UNIT_BEFORE, tu
, true
);
} else {
if (handle)
} else {
if (handle)
- if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m))) < 0)
+ if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m)
, true
)) < 0)
return r;
return r;
- return unit_add_dependency(UNIT(m), UNIT_BEFORE, tu);
+ return unit_add_dependency(UNIT(m), UNIT_BEFORE, tu
, true
);
}
}
}
}
@@
-385,7
+385,7
@@
static void mount_set_state(Mount *m, MountState state) {
mount_notify_automount(m, -ENODEV);
if (state != old_state)
mount_notify_automount(m, -ENODEV);
if (state != old_state)
- log_debug("%s changed %s
→
%s",
+ log_debug("%s changed %s
->
%s",
UNIT(m)->meta.id,
mount_state_to_string(old_state),
mount_state_to_string(state));
UNIT(m)->meta.id,
mount_state_to_string(old_state),
mount_state_to_string(state));
@@
-870,6
+870,14
@@
static const char *mount_sub_state_to_string(Unit *u) {
return mount_state_to_string(MOUNT(u)->state);
}
return mount_state_to_string(MOUNT(u)->state);
}
+static bool mount_check_gc(Unit *u) {
+ Mount *m = MOUNT(u);
+
+ assert(m);
+
+ return m->from_etc_fstab || m->from_proc_self_mountinfo;
+}
+
static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
Mount *m = MOUNT(u);
bool success;
static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
Mount *m = MOUNT(u);
bool success;
@@
-1454,6
+1462,7
@@
const UnitVTable mount_vtable = {
.no_alias = true,
.no_instances = true,
.no_alias = true,
.no_instances = true,
+ .no_isolate = true,
.init = mount_init,
.load = mount_load,
.init = mount_init,
.load = mount_load,
@@
-1473,6
+1482,8
@@
const UnitVTable mount_vtable = {
.active_state = mount_active_state,
.sub_state_to_string = mount_sub_state_to_string,
.active_state = mount_active_state,
.sub_state_to_string = mount_sub_state_to_string,
+ .check_gc = mount_check_gc,
+
.sigchld_event = mount_sigchld_event,
.timer_event = mount_timer_event,
.sigchld_event = mount_sigchld_event,
.timer_event = mount_timer_event,