From 927b1649448b812a7620ad013f4752d597b12407 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Nov 2013 20:52:39 +0100 Subject: logind: add virtual object paths that always can be used to refer to the callers session, user, seat or machine object This way clients can skip invoking GetSessionByPID() for their own PID or a similar call to access these objects. --- src/machine/machined-dbus.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/machine/machined-dbus.c') diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 505bc17e6a..11256da989 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -342,37 +342,6 @@ const sd_bus_vtable manager_vtable[] = { SD_BUS_VTABLE_END }; -int machine_node_enumerator(sd_bus *bus, const char *path, char ***nodes, void *userdata) { - _cleanup_strv_free_ char **l = NULL; - Machine *machine = NULL; - Manager *m = userdata; - Iterator i; - int r; - - assert(bus); - assert(path); - assert(nodes); - - HASHMAP_FOREACH(machine, m->machines, i) { - char *p; - - p = machine_bus_path(machine); - if (!p) - return -ENOMEM; - - r = strv_push(&l, p); - if (r < 0) { - free(p); - return r; - } - } - - *nodes = l; - l = NULL; - - return 1; -} - int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata) { const char *path, *result, *unit; Manager *m = userdata; -- cgit v1.2.3-54-g00ecf