chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ede3a79
)
scope: implement reset-failed command
author
Lennart Poettering
<lennart@poettering.net>
Mon, 1 Jul 2013 23:35:35 +0000
(
01:35
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 1 Jul 2013 23:48:55 +0000
(
01:48
+0200)
src/core/scope.c
patch
|
blob
|
history
diff --git
a/src/core/scope.c
b/src/core/scope.c
index f88addadf34b8fdd39842dff79bfba1193b7f7f1..e1a3545dbbcd48fc8eaa2a4dabf537432189ce7b 100644
(file)
--- a/
src/core/scope.c
+++ b/
src/core/scope.c
@@
-283,6
+283,17
@@
static int scope_stop(Unit *u) {
return 0;
}
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);
}
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,
.timer_event = scope_timer_event,
+ .reset_failed = scope_reset_failed,
+
.notify_cgroup_empty = scope_notify_cgroup_empty_event,
.bus_interface = "org.freedesktop.systemd1.Scope",
.notify_cgroup_empty = scope_notify_cgroup_empty_event,
.bus_interface = "org.freedesktop.systemd1.Scope",