summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/bus-control.c2
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c5
-rw-r--r--src/libsystemd/sd-bus/kdbus.h18
3 files changed, 7 insertions, 18 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 19aa4bd4f0..43c96726f8 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -76,7 +76,7 @@ static int bus_request_name_kernel(sd_bus *bus, const char *name, uint64_t flags
if (r < 0)
return -errno;
- if (n->flags & KDBUS_NAME_IN_QUEUE)
+ if (n->return_flags & KDBUS_NAME_IN_QUEUE)
return 0;
return 1;
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 4333445f2a..9e74530a36 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -840,9 +840,8 @@ fail:
int bus_kernel_take_fd(sd_bus *b) {
struct kdbus_bloom_parameter *bloom = NULL;
+ struct kdbus_item *items, *item;
struct kdbus_cmd_hello *hello;
- struct kdbus_item_list *items;
- struct kdbus_item *item;
_cleanup_free_ char *g = NULL;
const char *name;
size_t l = 0, m = 0, sz;
@@ -968,7 +967,7 @@ int bus_kernel_take_fd(sd_bus *b) {
/* extract bloom parameters from items */
items = (void*)((uint8_t*)b->kdbus_buffer + hello->offset);
- KDBUS_ITEM_FOREACH(item, items, items) {
+ KDBUS_FOREACH(item, items, hello->items_size) {
switch (item->type) {
case KDBUS_ITEM_BLOOM_PARAMETER:
bloom = &item->bloom_parameter;
diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h
index 4f321eb3eb..6cbd01c503 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/sd-bus/kdbus.h
@@ -457,16 +457,6 @@ struct kdbus_item {
} __attribute__((__aligned__(8)));
/**
- * struct kdbus_item_list - A list of items
- * @size: The total size of the structure
- * @items: Array of items
- */
-struct kdbus_item_list {
- __u64 size;
- struct kdbus_item items[0];
-} __attribute__((__aligned__(8)));
-
-/**
* enum kdbus_msg_flags - type of message
* @KDBUS_MSG_EXPECT_REPLY: Expect a reply message, used for
* method calls. The userspace-supplied
@@ -699,10 +689,10 @@ enum kdbus_hello_flags {
* @id: The ID of this connection (kernel → userspace)
* @pool_size: Size of the connection's buffer where the received
* messages are placed
- * @offset: Pool offset where additional items of type
- * kdbus_item_list are stored. They contain information
- * about the bus and the newly created connection.
- * @items_size: Copy of item_list.size stored in @offset.
+ * @offset: Pool offset where items are returned to report
+ * additional information about the bus and the newly
+ * created connection.
+ * @items_size: Size of buffer returned in the pool slice at @offset.
* @id128: Unique 128-bit ID of the bus (kernel → userspace)
* @items: A list of items
*