diff options
author | Daniel Mack <zonque@gmail.com> | 2013-11-15 15:55:27 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2013-11-29 14:06:49 +0100 |
commit | 9eb34e82257599399c3defa443d9b3d6aed8c57f (patch) | |
tree | a38a5b0b5f9be461dbffc3b09bf5969e9651ded4 /src/libsystemd-bus/bus-kernel.c | |
parent | 5461f53f186d4253c690df8d1ae06710e0d17585 (diff) |
libsystemd-bus: bring definitions in sync with kdbus
In particular, KDBUS_ITEM_NEXT is now called KDBUS_PART_NEXT, and
KDBUS_ITEM_FOREACH was renamed to KDBUS_PART_FOREACH and takes one more
argument to make it more flexible.
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r-- | src/libsystemd-bus/bus-kernel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c index f2b130b438..9d4b6cf721 100644 --- a/src/libsystemd-bus/bus-kernel.c +++ b/src/libsystemd-bus/bus-kernel.c @@ -409,7 +409,7 @@ static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) { off = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer; ioctl(bus->input_fd, KDBUS_CMD_MSG_RELEASE, &off); - KDBUS_ITEM_FOREACH(d, k) { + KDBUS_PART_FOREACH(d, k, items) { if (d->type == KDBUS_MSG_FDS) close_many(d->fds, (d->size - offsetof(struct kdbus_item, fds)) / sizeof(int)); @@ -435,7 +435,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k, sd_bus_mess if (k->payload_type != KDBUS_PAYLOAD_DBUS1) return 0; - KDBUS_ITEM_FOREACH(d, k) { + KDBUS_PART_FOREACH(d, k, items) { size_t l; l = d->size - offsetof(struct kdbus_item, data); @@ -489,7 +489,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k, sd_bus_mess if (r < 0) return r; - KDBUS_ITEM_FOREACH(d, k) { + KDBUS_PART_FOREACH(d, k, items) { size_t l; l = d->size - offsetof(struct kdbus_item, data); @@ -685,13 +685,13 @@ int bus_kernel_create(const char *name, char **s) { l = strlen(name); make = alloca0(offsetof(struct kdbus_cmd_bus_make, items) + - KDBUS_ITEM_HEADER_SIZE + sizeof(uint64_t) + - KDBUS_ITEM_HEADER_SIZE + DECIMAL_STR_MAX(uid_t) + 1 + l + 1); + KDBUS_PART_HEADER_SIZE + sizeof(uint64_t) + + KDBUS_PART_HEADER_SIZE + DECIMAL_STR_MAX(uid_t) + 1 + l + 1); n = make->items; n->type = KDBUS_MAKE_NAME; sprintf(n->str, "%lu-%s", (unsigned long) getuid(), name); - n->size = KDBUS_ITEM_HEADER_SIZE + strlen(n->str) + 1; + n->size = KDBUS_PART_HEADER_SIZE + strlen(n->str) + 1; make->size = offsetof(struct kdbus_cmd_bus_make, items) + n->size; make->flags = KDBUS_MAKE_POLICY_OPEN; |