mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-28 00:50:11 +00:00
bus: remove "on behalf" kdbus logic (ABI break)
This commit is contained in:
@@ -925,7 +925,6 @@ static int add_name_change_match(sd_bus *bus,
|
||||
|
||||
int bus_add_match_internal_kernel(
|
||||
sd_bus *bus,
|
||||
uint64_t id,
|
||||
struct bus_match_component *components,
|
||||
unsigned n_components,
|
||||
uint64_t cookie) {
|
||||
@@ -1063,7 +1062,6 @@ int bus_add_match_internal_kernel(
|
||||
m = alloca0(sz);
|
||||
m->size = sz;
|
||||
m->cookie = cookie;
|
||||
m->owner_id = id;
|
||||
|
||||
item = m->items;
|
||||
|
||||
@@ -1145,14 +1143,13 @@ int bus_add_match_internal(
|
||||
assert(match);
|
||||
|
||||
if (bus->is_kernel)
|
||||
return bus_add_match_internal_kernel(bus, 0, components, n_components, cookie);
|
||||
return bus_add_match_internal_kernel(bus, components, n_components, cookie);
|
||||
else
|
||||
return bus_add_match_internal_dbus1(bus, match);
|
||||
}
|
||||
|
||||
int bus_remove_match_internal_kernel(
|
||||
sd_bus *bus,
|
||||
uint64_t id,
|
||||
uint64_t cookie) {
|
||||
|
||||
struct kdbus_cmd_match m;
|
||||
@@ -1163,7 +1160,6 @@ int bus_remove_match_internal_kernel(
|
||||
zero(m);
|
||||
m.size = offsetof(struct kdbus_cmd_match, items);
|
||||
m.cookie = cookie;
|
||||
m.owner_id = id;
|
||||
|
||||
r = ioctl(bus->input_fd, KDBUS_CMD_MATCH_REMOVE, &m);
|
||||
if (r < 0)
|
||||
@@ -1204,7 +1200,7 @@ int bus_remove_match_internal(
|
||||
assert(match);
|
||||
|
||||
if (bus->is_kernel)
|
||||
return bus_remove_match_internal_kernel(bus, 0, cookie);
|
||||
return bus_remove_match_internal_kernel(bus, cookie);
|
||||
else
|
||||
return bus_remove_match_internal_dbus1(bus, match);
|
||||
}
|
||||
|
||||
@@ -26,5 +26,5 @@
|
||||
int bus_add_match_internal(sd_bus *bus, const char *match, struct bus_match_component *components, unsigned n_components, uint64_t cookie);
|
||||
int bus_remove_match_internal(sd_bus *bus, const char *match, uint64_t cookie);
|
||||
|
||||
int bus_add_match_internal_kernel(sd_bus *bus, uint64_t id, struct bus_match_component *components, unsigned n_components, uint64_t cookie);
|
||||
int bus_remove_match_internal_kernel(sd_bus *bus, uint64_t id, uint64_t cookie);
|
||||
int bus_add_match_internal_kernel(sd_bus *bus, struct bus_match_component *components, unsigned n_components, uint64_t cookie);
|
||||
int bus_remove_match_internal_kernel(sd_bus *bus, uint64_t cookie);
|
||||
|
||||
@@ -716,8 +716,6 @@ struct kdbus_cmd_update {
|
||||
/**
|
||||
* struct kdbus_cmd_match - struct to add or remove matches
|
||||
* @size: The total size of the struct
|
||||
* @owner_id: Privileged users may (de)register matches on behalf
|
||||
* of other peers
|
||||
* @cookie: Userspace supplied cookie. When removing, the cookie
|
||||
* identifies the match to remove
|
||||
* @items: A list of items for additional information
|
||||
@@ -727,7 +725,6 @@ struct kdbus_cmd_update {
|
||||
*/
|
||||
struct kdbus_cmd_match {
|
||||
__u64 size;
|
||||
__u64 owner_id;
|
||||
__u64 cookie;
|
||||
struct kdbus_item items[0];
|
||||
} __attribute__((aligned(8)));
|
||||
@@ -922,7 +919,7 @@ enum kdbus_ioctl_type {
|
||||
* size.
|
||||
* @ENOBUFS: There is no space left for the submitted data to fit
|
||||
* into the receiver's pool.
|
||||
* @ENOENT: The to be canceled message was not found.
|
||||
* @ENOENT: The to be cancelled message was not found.
|
||||
* @ENOMEM: Out of memory.
|
||||
* @ENOMSG: The queue is not empty, but no message with a matching
|
||||
* priority is currently queued.
|
||||
|
||||
Reference in New Issue
Block a user