chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: don't write tag objects if nothing has been written since the last time
[elogind.git]
/
src
/
systemctl
/
systemctl.c
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index 2e0aaaa9fadbba410b781e1b35ab78e7b7a5c446..24818492322fc98cecb8343345874afa7e2f74fc 100644
(file)
--- 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) {
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;
/* 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;
}
goto finish;
}
@@
-2147,7
+2148,7
@@
static void print_status_info(UnitStatusInfo *i) {
printf("\t Process: %u %s=%s ", p->pid, p->name, strna(t));
free(t);
printf("\t Process: %u %s=%s ", p->pid, p->name, strna(t));
free(t);
- good = is_clean_exit_lsb(p->code, p->status);
+ good = is_clean_exit_lsb(p->code, p->status
, NULL
);
if (!good) {
on = ansi_highlight_red(true);
off = ansi_highlight_red(false);
if (!good) {
on = ansi_highlight_red(true);
off = ansi_highlight_red(false);
@@
-3143,6
+3144,7
@@
finish:
static int daemon_reload(DBusConnection *bus, char **args) {
int r;
const char *method;
static int daemon_reload(DBusConnection *bus, char **args) {
int r;
const char *method;
+ DBusError error;
if (arg_action == ACTION_RELOAD)
method = "Reload";
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,
"org.freedesktop.systemd1.Manager",
method,
NULL,
-
NULL
,
+
&error
,
DBUS_TYPE_INVALID);
if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL)
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;
/* 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;
}
return r;
}