summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-12 00:43:29 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-12 00:43:29 +0200
commitc320885c9f16f622a9b48f529386482c76daa86c (patch)
tree57c3064284dfe3188669aae4806a34ad1f52f03f
parentde2975759deb218144ed949fb42eccb33b752826 (diff)
bus: properly check if kdbus connection worked
-rw-r--r--src/libsystemd-bus/bus-kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 65b8b7b961..b53c5eddcb 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -175,7 +175,7 @@ int bus_kernel_connect(sd_bus *b) {
assert(b->kernel);
b->input_fd = open(b->kernel, O_RDWR|O_NOCTTY|O_CLOEXEC);
- if (b->input_fd)
+ if (b->input_fd < 0)
return -errno;
b->output_fd = b->input_fd;