summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-26 17:48:14 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-26 21:52:07 +0100
commit72e6110485926c884f056717a21e4f5f3942908c (patch)
tree4b5ebf4a789ccbc17fbb3473fe27aa43042b4ac7 /src/libsystemd/sd-bus/bus-kernel.c
parentcc98b3025eeb89addb76a27390cb2baca4eab8b9 (diff)
sd-bus: reuse the KDBUS_CMD_FREE wrapper wherever appropriate
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index e73a5077b5..b4d0af102f 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -822,10 +822,6 @@ fail:
}
int bus_kernel_take_fd(sd_bus *b) {
- struct kdbus_cmd_free cmd_free = {
- .size = sizeof(cmd_free),
- .flags = 0,
- };
struct kdbus_bloom_parameter *bloom = NULL;
struct kdbus_cmd_hello *hello;
struct kdbus_item_list *items;
@@ -989,12 +985,10 @@ int bus_kernel_take_fd(sd_bus *b) {
/* free returned items */
(void) bus_kernel_cmd_free(b, hello->offset);
-
return bus_start_running(b);
fail:
- cmd_free.offset = hello->offset;
- (void) ioctl(b->input_fd, KDBUS_CMD_FREE, &cmd_free);
+ (void) bus_kernel_cmd_free(b, hello->offset);
return r;
}
@@ -1019,7 +1013,6 @@ int bus_kernel_connect(sd_bus *b) {
int bus_kernel_cmd_free(sd_bus *bus, uint64_t offset) {
struct kdbus_cmd_free cmd = {
.size = sizeof(cmd),
- .flags = 0,
.offset = offset,
};
int r;