chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8185a50
)
systemctl: fix error message when no connection to systemd is available
author
Lennart Poettering
<lennart@poettering.net>
Thu, 29 Sep 2011 14:00:29 +0000
(16:00 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 29 Sep 2011 14:00:29 +0000
(16:00 +0200)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 7af0f73827f05751a8dc71b0bf93664296adc876..9b54da16cae49d63e0ef7281231f2d435072bb60 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-4990,14
+4990,16
@@
static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
}
if (!bus) {
}
if (!bus) {
- log_error("Failed to get D-Bus connection: %s", error->message);
+ log_error("Failed to get D-Bus connection: %s",
+ dbus_error_is_set(error) ? error->message : "No connection to service manager.");
return -EIO;
}
} else {
if (!bus && !avoid_bus()) {
return -EIO;
}
} else {
if (!bus && !avoid_bus()) {
- log_error("Failed to get D-Bus connection: %s", error->message);
+ log_error("Failed to get D-Bus connection: %s",
+ dbus_error_is_set(error) ? error->message : "No connection to service manager.");
return -EIO;
}
}
return -EIO;
}
}