aed857
From bc54eb811caf738ee54867359f798dc0f4be9e7e Mon Sep 17 00:00:00 2001
aed857
From: Michal Schmidt <mschmidt@redhat.com>
aed857
Date: Thu, 16 Jul 2015 21:39:56 +0200
aed857
Subject: [PATCH] core: correct return value from reload methods
aed857
aed857
Return 1 from *_reload() methods to signify "we did something", just
aed857
like in *_start(). This causes "Reloading foo..." messages to be logged.
aed857
"Reloaded foo." messages are already logged.
aed857
aed857
(cherry picked from commit 2d018ae23b838f050516d06859f50ecb9733d44b)
aed857
aed857
Related: #1506256
aed857
---
aed857
 src/core/mount.c   | 2 +-
aed857
 src/core/service.c | 2 +-
aed857
 2 files changed, 2 insertions(+), 2 deletions(-)
aed857
aed857
diff --git a/src/core/mount.c b/src/core/mount.c
Pablo Greco 48fc63
index a6d93b8691..f726d96591 100644
aed857
--- a/src/core/mount.c
aed857
+++ b/src/core/mount.c
aed857
@@ -1081,7 +1081,7 @@ static int mount_reload(Unit *u) {
aed857
         assert(m->state == MOUNT_MOUNTED);
aed857
 
aed857
         mount_enter_remounting(m);
aed857
-        return 0;
aed857
+        return 1;
aed857
 }
aed857
 
aed857
 static int mount_serialize(Unit *u, FILE *f, FDSet *fds) {
aed857
diff --git a/src/core/service.c b/src/core/service.c
Pablo Greco 48fc63
index 71ec5e37c9..9622ce11ff 100644
aed857
--- a/src/core/service.c
aed857
+++ b/src/core/service.c
aed857
@@ -1939,7 +1939,7 @@ static int service_reload(Unit *u) {
aed857
         assert(s->state == SERVICE_RUNNING || s->state == SERVICE_EXITED);
aed857
 
aed857
         service_enter_reload(s);
aed857
-        return 0;
aed857
+        return 1;
aed857
 }
aed857
 
aed857
 _pure_ static bool service_can_reload(Unit *u) {