diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-28 15:07:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-28 15:07:13 +0100 |
commit | 82a2b6bb5e4e5d294f09af778c48974a7857afb6 (patch) | |
tree | 37d7926f1c1e575d8e1344890953ca6a0114a011 /src/core/automount.c | |
parent | 3ad85e3775d018f32098a2957ce25e1f53440da1 (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/automount.c')
-rw-r--r-- | src/core/automount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/automount.c b/src/core/automount.c index 51f7373f77..d47e6fa8dc 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -603,7 +603,7 @@ static int automount_start(Unit *u) { a->result = AUTOMOUNT_SUCCESS; automount_enter_waiting(a); - return 0; + return 1; } static int automount_stop(Unit *u) { @@ -613,7 +613,7 @@ static int automount_stop(Unit *u) { assert(a->state == AUTOMOUNT_WAITING || a->state == AUTOMOUNT_RUNNING); automount_enter_dead(a, AUTOMOUNT_SUCCESS); - return 0; + return 1; } static int automount_serialize(Unit *u, FILE *f, FDSet *fds) { |