core: set Result=start-limit-hit when a unit is rate limited
There is currently no way to figure out a rate limit was hit on a unit, as the last result is stripped in order to keep reporting the first result, which is useful in case of a watchdog failure, which is the reason why it was changed as such. But rate limiting is also an important information to provide to users, so allow the Result property to reflect it when it happens.
This commit is contained in:
+1
-1
@@ -324,7 +324,7 @@ static int timer_coldplug(Unit *u) {
|
||||
static void timer_enter_dead(Timer *t, TimerResult f) {
|
||||
assert(t);
|
||||
|
||||
if (t->result == TIMER_SUCCESS)
|
||||
if (t->result == TIMER_SUCCESS || f == TIMER_FAILURE_START_LIMIT_HIT)
|
||||
t->result = f;
|
||||
|
||||
unit_log_result(UNIT(t), t->result == TIMER_SUCCESS, timer_result_to_string(t->result));
|
||||
|
||||
Reference in New Issue
Block a user