summaryrefslogtreecommitdiff
path: root/src/machine/machined.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-19 20:43:18 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-19 20:43:18 +0100
commitebeccf9eecf5939a2ef772c3160e89efcad96194 (patch)
treea6cff5de068842effcb0964cd85c09abbdf3c0ad /src/machine/machined.c
parentc2ce6a3d82b717c4c1e6245ad8c6ce1173f502d0 (diff)
machined: add a full bus object for images
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r--src/machine/machined.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c
index ef59497fb2..82cfcf0fd9 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -27,15 +27,14 @@
#include <sys/epoll.h>
#include "sd-daemon.h"
-
#include "strv.h"
#include "conf-parser.h"
#include "cgroup-util.h"
#include "mkdir.h"
#include "bus-util.h"
#include "bus-error.h"
-#include "machined.h"
#include "label.h"
+#include "machined.h"
Manager *manager_new(void) {
Manager *m;
@@ -152,6 +151,14 @@ static int manager_connect_bus(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to add machine enumerator: %m");
+ r = sd_bus_add_fallback_vtable(m->bus, NULL, "/org/freedesktop/machine1/image", "org.freedesktop.machine1.Image", image_vtable, image_object_find, m);
+ if (r < 0)
+ return log_error_errno(r, "Failed to add image object vtable: %m");
+
+ r = sd_bus_add_node_enumerator(m->bus, NULL, "/org/freedesktop/machine1/image", image_node_enumerator, m);
+ if (r < 0)
+ return log_error_errno(r, "Failed to add image enumerator: %m");
+
r = sd_bus_add_match(m->bus,
NULL,
"type='signal',"