mirror of
https://github.com/troglobit/finit.git
synced 2026-11-25 20:28:23 +00:00
sm: handle runlevel change
Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
This commit is contained in:
1 parent
364f3bbafb
commit
60df2043ac
5 files changed
+105
-52
No files matched your search
@@ -27,14 +27,18 @@
|
||||
typedef enum {
|
||||
SM_BOOTSTRAP_STATE = 0,
|
||||
SM_RUNNING_STATE,
|
||||
SM_RUNLEVEL_CHANGE_STATE,
|
||||
SM_RUNLEVEL_WAIT_STOP_STATE,
|
||||
} sm_state_t;
|
||||
|
||||
typedef struct sm {
|
||||
sm_state_t state;
|
||||
int newlevel;
|
||||
} sm_t;
|
||||
|
||||
void sm_init(sm_t *sm);
|
||||
void sm_step(sm_t *sm);
|
||||
void sm_set_runlevel(sm_t *sm, int newlevel);
|
||||
|
||||
#endif /* FINIT_SM_H_ */
|
||||
|
||||
|
||||
Reference in new issue
Block a user