summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorSimon Peeters <peeters.simon@gmail.com>2012-08-10 17:32:19 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-10 18:08:22 +0200
commitc516c8d17f77a1c761447f4c40c8dfffeda2e06d (patch)
tree35fcd129b615b098432f2f0d658e27cab5ab915e /src/systemctl
parentfd5b4ca11ea2b8a82343bc0db6a2f422beb305f1 (diff)
systemctl: fix issue with systemctl daemon-reexec
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 2e0aaaa9fa..13e0f91096 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1537,11 +1537,12 @@ static int start_unit_one(
DBUS_TYPE_INVALID);
free(n);
if (r) {
- if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL ) {
+ if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL )
/* There's always a fallback possible for
* legacy actions. */
r = -EADDRNOTAVAIL;
- }
+ else
+ log_error("Failed to issue method call: %s", bus_error_message(error));
goto finish;
}
@@ -3143,6 +3144,7 @@ finish:
static int daemon_reload(DBusConnection *bus, char **args) {
int r;
const char *method;
+ DBusError error;
if (arg_action == ACTION_RELOAD)
method = "Reload";
@@ -3171,7 +3173,7 @@ static int daemon_reload(DBusConnection *bus, char **args) {
"org.freedesktop.systemd1.Manager",
method,
NULL,
- NULL,
+ &error,
DBUS_TYPE_INVALID);
if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL)
@@ -3182,6 +3184,9 @@ static int daemon_reload(DBusConnection *bus, char **args) {
/* On reexecution, we expect a disconnect, not
* a reply */
r = 0;
+ else if (r)
+ log_error("Failed to issue method call: %s", bus_error_message(&error));
+ dbus_error_free(&error);
return r;
}