diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-02-03 04:03:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-02-03 05:06:04 +0100 |
commit | 067d72c9fe698d305a07db17fc5b328e4a17cc8f (patch) | |
tree | 0df3076b1d1fe5d9161dedef78812867470507a2 /src/timer.h | |
parent | 81a5c6d03ef1e43e33bfb5ad006cf883c927a339 (diff) |
timer: convert failure bool into enum
Diffstat (limited to 'src/timer.h')
-rw-r--r-- | src/timer.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/timer.h b/src/timer.h index d5cbc11561..f5c5c64f25 100644 --- a/src/timer.h +++ b/src/timer.h @@ -56,6 +56,13 @@ typedef struct TimerValue { bool disabled; } TimerValue; +typedef enum TimerResult { + TIMER_SUCCESS, + TIMER_FAILURE_RESOURCES, + _TIMER_RESULT_MAX, + _TIMER_RESULT_INVALID = -1 +} TimerResult; + struct Timer { Unit meta; @@ -67,7 +74,7 @@ struct Timer { Watch timer_watch; - bool failure; + TimerResult result; }; void timer_unit_notify(Unit *u, UnitActiveState new_state); @@ -80,4 +87,7 @@ TimerState timer_state_from_string(const char *s); const char *timer_base_to_string(TimerBase i); TimerBase timer_base_from_string(const char *s); +const char* timer_result_to_string(TimerResult i); +TimerResult timer_result_from_string(const char *s); + #endif |