mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00:00
Refactor state machine control functions
This refactor should have been done years ago when we first introduced the big state machine. The old functions service_runvel() and the oddly named service_reload_dynamic() are actually state machine control fns, so let relocate them. Also in this commit, remove the global variable 'sm' and rename a few of the critical functions to better names. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
10 files changed
+135
-138
No files matched your search
+1
-1
@@ -218,7 +218,7 @@ static int do_delete(const char *fpath, const struct stat *sb, int tflag, struct
|
||||
err(1, "Failed removing condition %s", fpath);
|
||||
|
||||
cond = ptr + strlen(COND_BASE) + 1;
|
||||
if (sm_is_in_teardown(&sm))
|
||||
if (sm_in_reload())
|
||||
cond_clear_noupdate(cond);
|
||||
else
|
||||
cond_update(cond);
|
||||
|
||||
Reference in new issue
Block a user