summaryrefslogtreecommitdiff
path: root/src/libsystemd/bus-kernel.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-01-14 20:15:25 +0800
committerKay Sievers <kay@vrfy.org>2014-01-14 20:17:24 +0800
commit135a4eb43449bd64e4ec262573a6ffe29a5ffd03 (patch)
treedb7151230eb9422ccec1a3025019b89c87d2755e /src/libsystemd/bus-kernel.c
parent9597086027a937edfd7a3f5e5999796d2b34c8ad (diff)
bus: update kdbus.h (ABI break)
Diffstat (limited to 'src/libsystemd/bus-kernel.c')
-rw-r--r--src/libsystemd/bus-kernel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/bus-kernel.c b/src/libsystemd/bus-kernel.c
index e8f4c58110..d69d6f3bc4 100644
--- a/src/libsystemd/bus-kernel.c
+++ b/src/libsystemd/bus-kernel.c
@@ -1000,18 +1000,21 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *al
assert_se(pthread_mutex_lock(&bus->memfd_cache_mutex) >= 0);
if (bus->n_memfd_cache <= 0) {
+ struct kdbus_cmd_memfd_make cmd = {
+ .size = sizeof(struct kdbus_cmd_memfd_make),
+ };
int r;
assert_se(pthread_mutex_unlock(&bus->memfd_cache_mutex) >= 0);
- r = ioctl(bus->input_fd, KDBUS_CMD_MEMFD_NEW, &fd);
+ r = ioctl(bus->input_fd, KDBUS_CMD_MEMFD_NEW, &cmd);
if (r < 0)
return -errno;
*address = NULL;
*mapped = 0;
*allocated = 0;
- return fd;
+ return cmd.fd;
}
c = &bus->memfd_cache[--bus->n_memfd_cache];