summaryrefslogtreecommitdiff
path: root/src/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-17 00:57:51 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-17 00:57:51 +0200
commit45fb0699c45d2e042e04a53e3ea00501e3f65f59 (patch)
tree55d27b0b989e6d7f8770cb0ba1adbd300425c82e /src/dbus-unit.c
parentceda54d93c9c16f24737412cfbc719e01c474ef6 (diff)
systemctl: warn when operating on service files that changed on disk but haven't been reloaded
Diffstat (limited to 'src/dbus-unit.c')
-rw-r--r--src/dbus-unit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dbus-unit.c b/src/dbus-unit.c
index da7d1bd5b7..66b7ae8297 100644
--- a/src/dbus-unit.c
+++ b/src/dbus-unit.c
@@ -254,6 +254,23 @@ int bus_unit_append_cgroups(Manager *m, DBusMessageIter *i, const char *property
return 0;
}
+int bus_unit_append_need_daemon_reload(Manager *m, DBusMessageIter *i, const char *property, void *data) {
+ Unit *u = data;
+ dbus_bool_t b;
+
+ assert(m);
+ assert(i);
+ assert(property);
+ assert(u);
+
+ b = unit_need_daemon_reload(u);
+
+ if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
+ return -ENOMEM;
+
+ return 0;
+}
+
static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusConnection *connection, DBusMessage *message) {
DBusMessage *reply = NULL;
Manager *m = u->meta.manager;