struct kdbus_pids fake_pids;
char *fake_label;
+ char *cgroup_root;
+
char *description;
char *patch_sender;
int bus_set_address_system_remote(sd_bus *b, const char *host);
int bus_set_address_system_machine(sd_bus *b, const char *machine);
+int bus_get_root_path(sd_bus *bus);
+
int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
#define bus_assert_return(expr, r, error) \
free(b->kernel);
free(b->machine);
free(b->fake_label);
+ free(b->cgroup_root);
free(b->description);
free(b->patch_sender);
return 0;
}
+int bus_get_root_path(sd_bus *bus) {
+ int r;
+
+ if (bus->cgroup_root)
+ return 0;
+
+ r = cg_get_root_path(&bus->cgroup_root);
+ if (r == -ENOENT) {
+ bus->cgroup_root = strdup("/");
+ if (!bus->cgroup_root)
+ return -ENOMEM;
+
+ r = 0;
+ }
+
+ return r;
+}
+
_public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) {
int r;