chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kmsg-syslogd: increase terminate timeout to 5min to generte less debug spew
[elogind.git]
/
src
/
swap.c
diff --git
a/src/swap.c
b/src/swap.c
index 6ab99d5712f09d74058de5abdd286567dfbb1787..4ffe19f1e84a3052f60d48e3ba3d38388264925e 100644
(file)
--- a/
src/swap.c
+++ b/
src/swap.c
@@
-36,6
+36,7
@@
#include "dbus-swap.h"
#include "special.h"
#include "bus-errors.h"
#include "dbus-swap.h"
#include "special.h"
#include "bus-errors.h"
+#include "exit-status.h"
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
@@
-81,6
+82,7
@@
static void swap_unset_proc_swaps(Swap *s) {
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
exec_context_init(&s->exec_context);
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
exec_context_init(&s->exec_context);
+ s->exec_context.std_output = EXEC_OUTPUT_KMSG;
s->parameters_etc_fstab.priority = s->parameters_proc_swaps.priority = s->parameters_fragment.priority = -1;
s->parameters_etc_fstab.priority = s->parameters_proc_swaps.priority = s->parameters_fragment.priority = -1;
@@
-175,6
+177,7
@@
static int swap_add_target_links(Swap *s) {
return r;
if (!p->noauto &&
return r;
if (!p->noauto &&
+ !p->nofail &&
(p->handle || s->meta.manager->swap_auto) &&
s->from_etc_fstab &&
s->meta.manager->running_as == MANAGER_SYSTEM)
(p->handle || s->meta.manager->swap_auto) &&
s->from_etc_fstab &&
s->meta.manager->running_as == MANAGER_SYSTEM)
@@
-262,6
+265,8
@@
static int swap_load(Unit *u) {
return r;
if (u->meta.load_state == UNIT_LOADED) {
return r;
if (u->meta.load_state == UNIT_LOADED) {
+ if ((r = unit_add_exec_dependencies(u, &s->exec_context)) < 0)
+ return r;
if (s->meta.fragment_path)
s->from_fragment = true;
if (s->meta.fragment_path)
s->from_fragment = true;
@@
-1089,7
+1094,7
@@
int swap_fd_event(Manager *m, int events) {
assert(m);
assert(events & EPOLLPRI);
assert(m);
assert(events & EPOLLPRI);
- if ((r =
=
swap_load_proc_swaps(m, true)) < 0) {
+ if ((r = swap_load_proc_swaps(m, true)) < 0) {
log_error("Failed to reread /proc/swaps: %s", strerror(-r));
/* Reset flags, just in case, for late calls */
log_error("Failed to reread /proc/swaps: %s", strerror(-r));
/* Reset flags, just in case, for late calls */