mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-01 14:17:37 +03:00
sd-bus: sync kdbus.h (ABI break)
struct kdbus_cmd_conn_info takes a list of items now instead of a string. Fix the only user in SD of that ioctl.
This commit is contained in:
@ -389,13 +389,17 @@ static int bus_get_owner_kdbus(
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
size = offsetof(struct kdbus_cmd_conn_info, name);
|
size = offsetof(struct kdbus_cmd_conn_info, items);
|
||||||
cmd = alloca0_align(size, 8);
|
cmd = alloca0_align(size, 8);
|
||||||
cmd->id = id;
|
cmd->id = id;
|
||||||
} else {
|
} else {
|
||||||
size = offsetof(struct kdbus_cmd_conn_info, name) + strlen(name) + 1;
|
size_t item_size = KDBUS_ITEM_HEADER_SIZE + strlen(name) + 1;
|
||||||
|
|
||||||
|
size = offsetof(struct kdbus_cmd_conn_info, items) + item_size;
|
||||||
cmd = alloca0_align(size, 8);
|
cmd = alloca0_align(size, 8);
|
||||||
strcpy(cmd->name, name);
|
cmd->items[0].size = item_size;
|
||||||
|
cmd->items[0].type = KDBUS_ITEM_NAME;
|
||||||
|
strcpy(cmd->items[0].str, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd->size = size;
|
cmd->size = size;
|
||||||
|
@ -681,7 +681,7 @@ struct kdbus_cmd_conn_info {
|
|||||||
__u64 flags;
|
__u64 flags;
|
||||||
__u64 id;
|
__u64 id;
|
||||||
__u64 offset;
|
__u64 offset;
|
||||||
char name[0];
|
struct kdbus_item items[0];
|
||||||
} __attribute__((aligned(8)));
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user