chiark / gitweb /
bus: catch up with latest kdbus changes
[elogind.git] / src / libsystemd-bus / bus-kernel.c
index 2c87f22fd7f5e7509d9d27f52055f4e946746e61..495d7e57dc596b97ac5cf77b2ed9384ea8329f93 100644 (file)
@@ -462,7 +462,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_FREE, &off);
 
-        KDBUS_PART_FOREACH(d, k, items) {
+        KDBUS_ITEM_FOREACH(d, k, items) {
 
                 if (d->type == KDBUS_ITEM_FDS)
                         close_many(d->fds, (d->size - offsetof(struct kdbus_item, fds)) / sizeof(int));
@@ -589,7 +589,7 @@ static int bus_kernel_translate_message(sd_bus *bus, struct kdbus_msg *k) {
         assert(k);
         assert(k->payload_type == KDBUS_PAYLOAD_KERNEL);
 
-        KDBUS_PART_FOREACH(d, k, items) {
+        KDBUS_ITEM_FOREACH(d, k, items) {
                 if (d->type >= _KDBUS_ITEM_KERNEL_BASE && d->type < _KDBUS_ITEM_KERNEL_BASE + ELEMENTSOF(translate)) {
                         if (found)
                                 return -EBADMSG;
@@ -620,7 +620,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
         assert(k);
         assert(k->payload_type == KDBUS_PAYLOAD_DBUS1);
 
-        KDBUS_PART_FOREACH(d, k, items) {
+        KDBUS_ITEM_FOREACH(d, k, items) {
                 size_t l;
 
                 l = d->size - offsetof(struct kdbus_item, data);
@@ -680,7 +680,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
         if (r < 0)
                 return r;
 
-        KDBUS_PART_FOREACH(d, k, items) {
+        KDBUS_ITEM_FOREACH(d, k, items) {
                 size_t l;
 
                 l = d->size - offsetof(struct kdbus_item, data);
@@ -1063,11 +1063,10 @@ int bus_kernel_create_bus(const char *name, char **s) {
         n = make->items;
         sprintf(n->str, "%lu-%s", (unsigned long) getuid(), name);
         n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
-        n->type = KDBUS_MAKE_NAME;
+        n->type = KDBUS_ITEM_MAKE_NAME;
 
         make->size = ALIGN8(offsetof(struct kdbus_cmd_bus_make, items) + n->size);
         make->flags = KDBUS_MAKE_POLICY_OPEN;
-        make->bus_flags = 0;
         make->bloom_size = BLOOM_SIZE;
         assert_cc(BLOOM_SIZE % 8 == 0);
 
@@ -1167,7 +1166,7 @@ int bus_kernel_create_namespace(const char *name, char **s) {
         n = make->items;
         strcpy(n->str, name);
         n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
-        n->type = KDBUS_MAKE_NAME;
+        n->type = KDBUS_ITEM_MAKE_NAME;
 
         make->size = ALIGN8(offsetof(struct kdbus_cmd_ns_make, items) + n->size);
         make->flags = KDBUS_MAKE_POLICY_OPEN | KDBUS_MAKE_ACCESS_WORLD;