X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fswap.c;h=54a8640aa4948e86e316579f25f56051bf4b7e65;hb=4d8a7798e7f12c6400495cbc4d0ad57ed20ce90a;hp=a0b16776457e0c887964c1aa24df112236e61d76;hpb=3611581ebdabbe3a1d6a9b5310a0b59792279d7d;p=elogind.git diff --git a/src/swap.c b/src/swap.c index a0b167764..54a8640aa 100644 --- a/src/swap.c +++ b/src/swap.c @@ -613,6 +613,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) { true, s->meta.manager->confirm_spawn, s->meta.cgroup_bondings, + s->meta.cgroup_attributes, &pid)) < 0) goto fail; @@ -1278,12 +1279,12 @@ static int swap_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError * if (who == KILL_MAIN) { dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "Swap units have no main processes"); - return -EINVAL; + return -ESRCH; } if (s->control_pid <= 0 && who == KILL_CONTROL) { dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill"); - return -ENOENT; + return -ESRCH; } if (who == KILL_CONTROL || who == KILL_ALL) @@ -1339,6 +1340,10 @@ DEFINE_STRING_TABLE_LOOKUP(swap_exec_command, SwapExecCommand); const UnitVTable swap_vtable = { .suffix = ".swap", + .sections = + "Unit\0" + "Swap\0" + "Install\0", .no_alias = true, .no_instances = true,