[systemd-commits] src/libsystemd-bus src/systemctl

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sun Nov 10 01:41:17 CET 2013


 src/libsystemd-bus/bus-message.c |    2 +-
 src/systemctl/systemctl.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0a9776c23010512b9096508ff795d12da0f8fc2d
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Nov 9 19:40:46 2013 -0500

    systemctl: make sure daemon-reload returns success
    
    Also change sd_bus_message_exit_container to return -ENOENT
    when not in a container, to make it easier to distinguish different
    errors.

diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 2c2e69e..411156a 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -3018,7 +3018,7 @@ _public_ int sd_bus_message_exit_container(sd_bus_message *m) {
 
         assert_return(m, -EINVAL);
         assert_return(m->sealed, -EPERM);
-        assert_return(m->n_containers > 0, -EINVAL);
+        assert_return(m->n_containers > 0, -ENOENT);
 
         c = message_get_container(m);
         if (c->enclosing == SD_BUS_TYPE_ARRAY) {
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 24295e4..df4bd21 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3762,7 +3762,7 @@ static int daemon_reload(sd_bus *bus, char **args) {
         else if (r < 0)
                 log_error("Failed to execute operation: %s", bus_error_message(&error, r));
 
-        return r;
+        return r < 0 ? r : 0;
 }
 
 static int reset_failed(sd_bus *bus, char **args) {



More information about the systemd-commits mailing list