summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd/sd-bus/bus-control.c10
-rw-r--r--src/libsystemd/sd-bus/kdbus.h18
2 files changed, 16 insertions, 12 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 5ff746c6fb..d344387bb3 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -399,8 +399,8 @@ static int bus_get_owner_kdbus(
sd_bus_creds **creds) {
_cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
- struct kdbus_cmd_conn_info *cmd;
- struct kdbus_conn_info *conn_info;
+ struct kdbus_cmd_info *cmd;
+ struct kdbus_info *conn_info;
struct kdbus_item *item;
size_t size, l;
uint64_t m, id;
@@ -410,12 +410,12 @@ static int bus_get_owner_kdbus(
if (r < 0)
return r;
if (r > 0) {
- size = offsetof(struct kdbus_cmd_conn_info, items);
+ size = offsetof(struct kdbus_cmd_info, items);
cmd = alloca0_align(size, 8);
cmd->id = id;
} else {
l = strlen(name) + 1;
- size = offsetof(struct kdbus_cmd_conn_info, items) + KDBUS_ITEM_SIZE(l);
+ size = offsetof(struct kdbus_cmd_info, items) + KDBUS_ITEM_SIZE(l);
cmd = alloca0_align(size, 8);
cmd->items[0].size = KDBUS_ITEM_HEADER_SIZE + l;
cmd->items[0].type = KDBUS_ITEM_NAME;
@@ -429,7 +429,7 @@ static int bus_get_owner_kdbus(
if (r < 0)
return -errno;
- conn_info = (struct kdbus_conn_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset);
+ conn_info = (struct kdbus_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset);
/* Non-activated names are considered not available */
if (conn_info->flags & KDBUS_HELLO_ACTIVATOR) {
diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h
index 50b4ec41b3..7a715a0994 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/sd-bus/kdbus.h
@@ -721,7 +721,7 @@ struct kdbus_name_list {
};
/**
- * struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl
+ * struct kdbus_cmd_info - struct used for KDBUS_CMD_CONN_INFO ioctl
* @size: The total size of the struct
* @flags: KDBUS_ATTACH_* flags, userspace → kernel
* @kernel_flags: Supported KDBUS_ATTACH_* flags, kernel → userspace
@@ -729,16 +729,16 @@ struct kdbus_name_list {
* @name is required. kdbus will look up the name to
* determine the ID in this case.
* @offset: Returned offset in the caller's pool buffer where the
- * kdbus_conn_info struct result is stored. The user must
+ * kdbus_info struct result is stored. The user must
* use KDBUS_CMD_FREE to free the allocated memory.
* @name: The optional well-known name to look up. Only needed in
* case @id is zero.
*
* On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will
* tell the user the offset in the connection pool buffer at which to find the
- * result in a struct kdbus_conn_info.
+ * result in a struct kdbus_info.
*/
-struct kdbus_cmd_conn_info {
+struct kdbus_cmd_info {
__u64 size;
__u64 flags;
__u64 kernel_flags;
@@ -748,7 +748,7 @@ struct kdbus_cmd_conn_info {
} __attribute__((aligned(8)));
/**
- * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO
+ * struct kdbus_info - information returned by KDBUS_CMD_CONN_INFO
* @size: The total size of the struct
* @id: The connection's 64-bit ID
* @flags: The connection's flags
@@ -757,7 +757,7 @@ struct kdbus_cmd_conn_info {
* Note that the user is responsible for freeing the allocated memory with
* the KDBUS_CMD_FREE ioctl.
*/
-struct kdbus_conn_info {
+struct kdbus_info {
__u64 size;
__u64 id;
__u64 flags;
@@ -856,6 +856,8 @@ struct kdbus_cmd_match {
* @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used to
* update the metadata subscription mask and
* policy.
+ * @KDBUS_CMD_BUS_CREATOR_INFO: Retrieve information of the creator of the bus
+ * a connection is attached to.
* @KDBUS_CMD_ENDPOINT_UPDATE: Update the properties of a custom enpoint. Used
* to update the policy.
* @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages should
@@ -891,9 +893,11 @@ enum kdbus_ioctl_type {
struct kdbus_cmd_name_list),
KDBUS_CMD_CONN_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x60,
- struct kdbus_cmd_conn_info),
+ struct kdbus_cmd_info),
KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61,
struct kdbus_cmd_update),
+ KDBUS_CMD_BUS_CREATOR_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x62,
+ struct kdbus_cmd_info),
KDBUS_CMD_ENDPOINT_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71,
struct kdbus_cmd_update),