summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-12-18 21:16:35 +0100
committerKay Sievers <kay@vrfy.org>2013-12-18 21:16:35 +0100
commitec76ec1fde7da753676b18ff45926740fcd08072 (patch)
tree3141147499dc2ba46aed18d4e91ab0625b9f4cee /src/libsystemd-bus
parent3e8a51eae6815eb9f54a6b672ba5e1a17d0bffe9 (diff)
bus: catch up with kdbus changes
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-kernel.c6
-rw-r--r--src/libsystemd-bus/kdbus.h11
2 files changed, 8 insertions, 9 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 7d514616a4..369eac468b 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -636,7 +636,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
case KDBUS_ITEM_PAYLOAD_OFF:
if (!h) {
- h = (struct bus_header *)((uint8_t *)bus->kdbus_buffer + d->vec.offset);
+ h = (struct bus_header *)((uint8_t *)k + d->vec.offset);
if (!bus_header_is_complete(h, d->vec.size))
return -EBADMSG;
@@ -721,11 +721,11 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
if (idx >= begin_body) {
if (!part->is_zero)
- part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset;
+ part->data = (uint8_t *)k + d->vec.offset;
part->size = d->vec.size;
} else {
if (!part->is_zero)
- part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset + (begin_body - idx);
+ part->data = (uint8_t *)k + d->vec.offset + (begin_body - idx);
part->size = d->vec.size - (begin_body - idx);
}
diff --git a/src/libsystemd-bus/kdbus.h b/src/libsystemd-bus/kdbus.h
index f570c0d674..4896c38dfe 100644
--- a/src/libsystemd-bus/kdbus.h
+++ b/src/libsystemd-bus/kdbus.h
@@ -45,10 +45,8 @@ struct kdbus_notify_id_change {
/**
* struct kdbus_notify_name_change - name registry change message
- * @old_id: Former owner of a name
- * @new_id: New owner of a name
- * @old_flags: flags from KDBUS_NAME_* the name entry used to have
- * @new_flags: flags from KDBUS_NAME_* the name entry has now
+ * @old: ID and flags of former owner of a name
+ * @new: ID and flags of new owner of a name
* @name: Well-known name
*
* Sent from kernel to userspace when the owner or activator of
@@ -119,7 +117,8 @@ struct kdbus_timestamp {
* struct kdbus_vec - I/O vector for kdbus payload items
* @size: The size of the vector
* @address: Memory address for memory addresses
- * @offset: Offset in the in-message payload memory
+ * @offset: Offset in the in-message payload memory,
+ * relative to the message head
*
* Attached to:
* KDBUS_ITEM_PAYLOAD_VEC
@@ -195,7 +194,7 @@ struct kdbus_policy {
/**
* enum kdbus_item_type - item types to chain data in a list
* @KDBUS_ITEM_PAYLOAD_VEC: Vector to data
- * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset in the pool
+ * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset to message head
* @KDBUS_ITEM_PAYLOAD_MEMFD: Data as sealed memfd
* @KDBUS_ITEM_FDS: Attached file descriptors
* @KDBUS_ITEM_BLOOM: For broadcasts, carries bloom filter