chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journald: adjust permissions for rotated files
[elogind.git]
/
src
/
timer.h
diff --git
a/src/timer.h
b/src/timer.h
index ad55cf7c8791786a5c56dede8d59a469eb65c0f1..f5c5c64f2509ceb63d4878395ce6bfdb5ce823ae 100644
(file)
--- a/
src/timer.h
+++ b/
src/timer.h
@@
-56,8
+56,15
@@
typedef struct TimerValue {
bool disabled;
} TimerValue;
bool disabled;
} TimerValue;
+typedef enum TimerResult {
+ TIMER_SUCCESS,
+ TIMER_FAILURE_RESOURCES,
+ _TIMER_RESULT_MAX,
+ _TIMER_RESULT_INVALID = -1
+} TimerResult;
+
struct Timer {
struct Timer {
-
Meta
meta;
+
Unit
meta;
LIST_HEAD(TimerValue, values);
usec_t next_elapse;
LIST_HEAD(TimerValue, values);
usec_t next_elapse;
@@
-67,7
+74,7
@@
struct Timer {
Watch timer_watch;
Watch timer_watch;
-
bool failure
;
+
TimerResult result
;
};
void timer_unit_notify(Unit *u, UnitActiveState new_state);
};
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_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
#endif