/* Non-activated names are considered not available */
if (conn_info->flags & KDBUS_HELLO_ACTIVATOR)
- return name[0] == ':' ? -ENXIO : -ENOENT;
+ return name[0] == ':' ? -ENXIO : -ESRCH;
c = bus_creds_new();
if (!c)
goto fail;
}
- if (!bus->cgroup_root) {
- r = cg_get_root_path(&bus->cgroup_root);
- if (r < 0)
- goto fail;
- }
+ r = bus_get_root_path(bus);
+ if (r < 0)
+ goto fail;
c->cgroup_root = strdup(bus->cgroup_root);
if (!c->cgroup_root) {
int bus_add_match_internal_kernel(
sd_bus *bus,
- uint64_t id,
struct bus_match_component *components,
unsigned n_components,
uint64_t cookie) {
m = alloca0(sz);
m->size = sz;
m->cookie = cookie;
- m->owner_id = id;
item = m->items;
uint64_t cookie) {
assert(bus);
- 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;
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)
uint64_t cookie) {
assert(bus);
- 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);
}