From 82a2b6bb5e4e5d294f09af778c48974a7857afb6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Jan 2015 15:07:13 +0100 Subject: 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. --- src/core/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/mount.c') diff --git a/src/core/mount.c b/src/core/mount.c index f944c02e2b..6bd6914509 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1037,7 +1037,7 @@ static int mount_start(Unit *u) { m->reload_result = MOUNT_SUCCESS; mount_enter_mounting(m); - return 0; + return 1; } static int mount_stop(Unit *u) { @@ -1061,7 +1061,7 @@ static int mount_stop(Unit *u) { m->state == MOUNT_REMOUNTING_SIGKILL); mount_enter_unmounting(m); - return 0; + return 1; } static int mount_reload(Unit *u) { -- cgit v1.2.3-54-g00ecf