scope: implement reset-failed command
This commit is contained in:
parent
ede3a79675
commit
8bcca7e201
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue