chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main: newer kernels return EINVAL if we invoke reboot() in a container lacking perms...
[elogind.git]
/
src
/
core
/
mount.c
diff --git
a/src/core/mount.c
b/src/core/mount.c
index 82c64ff79b5d697be155bf54bb4d86ae30b0836b..fc981c74f430dc957ef8ef14578a2f0e3f5ee9b5 100644
(file)
--- a/
src/core/mount.c
+++ b/
src/core/mount.c
@@
-634,7
+634,7
@@
static int mount_load(Unit *u) {
if (r < 0)
return r;
if (r < 0)
return r;
- r = unit_
patch_working_directory(UNIT(m)
, &m->exec_context);
+ r = unit_
exec_context_defaults(u
, &m->exec_context);
if (r < 0)
return r;
}
if (r < 0)
return r;
}
@@
-1225,7
+1225,7
@@
static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
m->control_pid = 0;
m->control_pid = 0;
- if (is_clean_exit(code, status))
+ if (is_clean_exit(code, status
, NULL
))
f = MOUNT_SUCCESS;
else if (code == CLD_EXITED)
f = MOUNT_FAILURE_EXIT_CODE;
f = MOUNT_SUCCESS;
else if (code == CLD_EXITED)
f = MOUNT_FAILURE_EXIT_CODE;
@@
-1708,7
+1708,7
@@
static void mount_reset_failed(Unit *u) {
m->reload_result = MOUNT_SUCCESS;
}
m->reload_result = MOUNT_SUCCESS;
}
-static int mount_kill(Unit *u, KillWho who,
KillMode mode,
int signo, DBusError *error) {
+static int mount_kill(Unit *u, KillWho who, int signo, DBusError *error) {
Mount *m = MOUNT(u);
int r = 0;
Set *pid_set = NULL;
Mount *m = MOUNT(u);
int r = 0;
Set *pid_set = NULL;
@@
-1730,23
+1730,25
@@
static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
if (kill(m->control_pid, signo) < 0)
r = -errno;
if (kill(m->control_pid, signo) < 0)
r = -errno;
- if (who == KILL_ALL
&& mode == KILL_CONTROL_GROUP
) {
+ if (who == KILL_ALL) {
int q;
int q;
- if (!(pid_set = set_new(trivial_hash_func, trivial_compare_func)))
+ pid_set = set_new(trivial_hash_func, trivial_compare_func);
+ if (!pid_set)
return -ENOMEM;
/* Exclude the control pid from being killed via the cgroup */
return -ENOMEM;
/* Exclude the control pid from being killed via the cgroup */
- if (m->control_pid > 0)
- if ((q = set_put(pid_set, LONG_TO_PTR(m->control_pid))) < 0) {
+ if (m->control_pid > 0) {
+ q = set_put(pid_set, LONG_TO_PTR(m->control_pid));
+ if (q < 0) {
r = q;
goto finish;
}
r = q;
goto finish;
}
+ }
q = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, signo, false, false, pid_set, NULL);
q = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, signo, false, false, pid_set, NULL);
- if (q < 0)
- if (q != -EAGAIN && q != -ESRCH && q != -ENOENT)
- r = q;
+ if (q < 0 && q != -EAGAIN && q != -ESRCH && q != -ENOENT)
+ r = q;
}
finish:
}
finish: