bus: remove "on behalf" kdbus logic (ABI break)

This commit is contained in:
Kay Sievers
2014-04-22 22:52:19 +02:00
parent cc544d5fb4
commit 26e376bfe3
3 changed files with 5 additions and 12 deletions
+2 -6
View File
@@ -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);
}
+2 -2
View File
@@ -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);
+1 -4
View File
@@ -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.