projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
652eb44
)
systemctl: fix detection whether the dbus connection is available
author
Lennart Poettering
<lennart@poettering.net>
Thu, 29 Sep 2011 13:31:53 +0000
(15:31 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 29 Sep 2011 13:32:10 +0000
(15:32 +0200)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index
848d6a8
..
7af0f73
100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-4989,6
+4989,13
@@
static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
return 0;
}
+ if (!bus) {
+ log_error("Failed to get D-Bus connection: %s", error->message);
+ return -EIO;
+ }
+
+ } else {
+
if (!bus && !avoid_bus()) {
log_error("Failed to get D-Bus connection: %s", error->message);
return -EIO;