summaryrefslogtreecommitdiff
path: root/src/core/swap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-28 15:07:13 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-28 15:07:13 +0100
commit82a2b6bb5e4e5d294f09af778c48974a7857afb6 (patch)
tree37d7926f1c1e575d8e1344890953ca6a0114a011 /src/core/swap.c
parent3ad85e3775d018f32098a2957ce25e1f53440da1 (diff)
core: output unit status output strings to console, only if we actually are changing unit state
Unit _start() and _stop() implementations can fail with -EAGAIN to delay execution temporarily. Thus, we should not output status messages before invoking these calls, but after, and only when we know that the invocation actually made a change.
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 1ef672f7e9..4fbabda568 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -837,7 +837,7 @@ static int swap_start(Unit *u) {
s->result = SWAP_SUCCESS;
swap_enter_activating(s);
- return 0;
+ return 1;
}
static int swap_stop(Unit *u) {
@@ -860,7 +860,7 @@ static int swap_stop(Unit *u) {
return -EPERM;
swap_enter_deactivating(s);
- return 0;
+ return 1;
}
static int swap_serialize(Unit *u, FILE *f, FDSet *fds) {