summaryrefslogtreecommitdiffstats
path: root/src/core/scope.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-02 01:35:35 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-02 01:48:55 +0200
commit8bcca7e201b235a7e7ea28d735db142ad96b9d64 (patch)
treef576110a780190412936cf9f28a049f6015a4ba7 /src/core/scope.c
parentcore: split out unit bus path unescaping into unit_name_from_dbus_path() (diff)
downloadsystemd-8bcca7e201b235a7e7ea28d735db142ad96b9d64.tar.xz
systemd-8bcca7e201b235a7e7ea28d735db142ad96b9d64.zip
scope: implement reset-failed command
Diffstat (limited to '')
-rw-r--r--src/core/scope.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/scope.c b/src/core/scope.c
index f88addadf3..e1a3545dbb 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -283,6 +283,17 @@ static int scope_stop(Unit *u) {
return 0;
}
+static void scope_reset_failed(Unit *u) {
+ Scope *s = SCOPE(u);
+
+ assert(s);
+
+ if (s->state == SCOPE_FAILED)
+ scope_set_state(s, SCOPE_DEAD);
+
+ s->result = SCOPE_SUCCESS;
+}
+
static int scope_kill(Unit *u, KillWho who, int signo, DBusError *error) {
return unit_kill_common(u, who, signo, -1, -1, error);
}
@@ -455,6 +466,8 @@ const UnitVTable scope_vtable = {
.timer_event = scope_timer_event,
+ .reset_failed = scope_reset_failed,
+
.notify_cgroup_empty = scope_notify_cgroup_empty_event,
.bus_interface = "org.freedesktop.systemd1.Scope",