summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-03 15:36:50 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-03 15:37:46 +0200
commit3e2d435b3d2247a60d6def932d28a4856566a7d7 (patch)
tree6373008fa09233ebb0d326cea55acc6df8c4dee4 /src/core/service.c
parentab016c45a96bad3fe799ce5d680dbecf3878470b (diff)
exit-status: rename ExitStatusSet's "code" field to "status"
We should follow the naming scheme waitid() uses, not come up with our own reversed one...
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/service.c b/src/core/service.c
index e221899591..be88670bd8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -335,7 +335,7 @@ static int service_verify(Service *s) {
return -EINVAL;
}
- if (s->type == SERVICE_ONESHOT && !(set_isempty(s->restart_force_status.signal) && set_isempty(s->restart_force_status.code))) {
+ if (s->type == SERVICE_ONESHOT && !(set_isempty(s->restart_force_status.signal) && set_isempty(s->restart_force_status.status))) {
log_error_unit(UNIT(s)->id, "%s has RestartForceStatus= set, which isn't allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
return -EINVAL;
}
@@ -1071,9 +1071,9 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart)
(s->restart == SERVICE_RESTART_ON_ABNORMAL && !IN_SET(s->result, SERVICE_SUCCESS, SERVICE_FAILURE_EXIT_CODE)) ||
(s->restart == SERVICE_RESTART_ON_WATCHDOG && s->result == SERVICE_FAILURE_WATCHDOG) ||
(s->restart == SERVICE_RESTART_ON_ABORT && IN_SET(s->result, SERVICE_FAILURE_SIGNAL, SERVICE_FAILURE_CORE_DUMP)) ||
- (s->main_exec_status.code == CLD_EXITED && set_contains(s->restart_force_status.code, INT_TO_PTR(s->main_exec_status.status))) ||
+ (s->main_exec_status.code == CLD_EXITED && set_contains(s->restart_force_status.status, INT_TO_PTR(s->main_exec_status.status))) ||
(IN_SET(s->main_exec_status.code, CLD_KILLED, CLD_DUMPED) && set_contains(s->restart_force_status.signal, INT_TO_PTR(s->main_exec_status.status)))) &&
- (s->main_exec_status.code != CLD_EXITED || !set_contains(s->restart_prevent_status.code, INT_TO_PTR(s->main_exec_status.status))) &&
+ (s->main_exec_status.code != CLD_EXITED || !set_contains(s->restart_prevent_status.status, INT_TO_PTR(s->main_exec_status.status))) &&
(!IN_SET(s->main_exec_status.code, CLD_KILLED, CLD_DUMPED) || !set_contains(s->restart_prevent_status.signal, INT_TO_PTR(s->main_exec_status.status)))) {
r = service_arm_timer(s, s->restart_usec);