}
int bus_kernel_take_fd(sd_bus *b) {
+ struct kdbus_cmd_free cmd_free = {
+ .size = sizeof(cmd_free),
+ .flags = 0,
+ };
struct kdbus_bloom_parameter *bloom = NULL;
struct kdbus_cmd_hello *hello;
struct kdbus_item_list *items;
return bus_start_running(b);
fail:
- (void) bus_kernel_cmd_free(b, hello->offset);
+ cmd_free.offset = hello->offset;
+ (void) ioctl(b->input_fd, KDBUS_CMD_FREE, &cmd_free);
return r;
}
make = alloca0_align(offsetof(struct kdbus_cmd_make, items) +
ALIGN8(offsetof(struct kdbus_item, bloom_parameter) + sizeof(struct kdbus_bloom_parameter)) +
ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
+ ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
ALIGN8(offsetof(struct kdbus_item, str) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1),
8);
n->data64[0] = _KDBUS_ATTACH_ANY;
make->size += ALIGN8(n->size);
+ /* Provide all metadata via bus-owner queries */
+ n = KDBUS_ITEM_NEXT(n);
+ n->type = KDBUS_ITEM_ATTACH_FLAGS_SEND;
+ n->size = offsetof(struct kdbus_item, data64) + sizeof(uint64_t);
+ n->data64[0] = _KDBUS_ATTACH_ANY;
+ make->size += ALIGN8(n->size);
+
/* Set the a good name */
n = KDBUS_ITEM_NEXT(n);
sprintf(n->str, UID_FMT "-%s", getuid(), name);