summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-bus.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-08-17 10:10:04 +0200
committerDaniel Mack <github@zonque.org>2015-08-17 10:10:04 +0200
commite503467fa021a46b244cf4c012a4485167cca4d0 (patch)
treea681cefaa50a1a00e40be257b13c2fa6ac6b63e1 /src/libsystemd/sd-bus/sd-bus.c
parent4fe66a7155a183308d5e323d303f494d7b135b87 (diff)
parent8ac43fee1a2890d62edfe29282f66780bc1b634f (diff)
Merge pull request #953 from poettering/ebadf
tree-wide: generate EBADF when we get invalid fds
Diffstat (limited to 'src/libsystemd/sd-bus/sd-bus.c')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index b9e2782564..db4f21e9ff 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -213,8 +213,8 @@ _public_ int sd_bus_set_address(sd_bus *bus, const char *address) {
_public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) {
assert_return(bus, -EINVAL);
assert_return(bus->state == BUS_UNSET, -EPERM);
- assert_return(input_fd >= 0, -EINVAL);
- assert_return(output_fd >= 0, -EINVAL);
+ assert_return(input_fd >= 0, -EBADF);
+ assert_return(output_fd >= 0, -EBADF);
assert_return(!bus_pid_changed(bus), -ECHILD);
bus->input_fd = input_fd;