diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-02 13:02:41 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2014-10-02 13:04:04 +0200 |
commit | 581fe6c8176c6ea4ad998566df0746bf7b56456f (patch) | |
tree | a52fdb1390da1e55326b2366e2423e3caee11755 /src/libsystemd/sd-bus/bus-control.c | |
parent | 4cf07da260b6c21596fec9a6a03a615729f617dc (diff) |
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.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-control.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 4ad44469b5..d9a53c702f 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -389,13 +389,17 @@ static int bus_get_owner_kdbus( if (r < 0) return r; 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->id = id; } 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); - 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; |