diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-02 01:35:35 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-02 01:48:55 +0200 |
commit | 8bcca7e201b235a7e7ea28d735db142ad96b9d64 (patch) | |
tree | f576110a780190412936cf9f28a049f6015a4ba7 /src/core/scope.c | |
parent | ede3a7967560506486e1e25d09ef4e74600851ff (diff) |
scope: implement reset-failed command
Diffstat (limited to 'src/core/scope.c')
-rw-r--r-- | src/core/scope.c | 13 |
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", |