From 4a8a92af2ec61c292fc0efc60a6f9885ceaa9ab5 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 7 Jun 2016 18:32:31 +0200 Subject: [PATCH] Minor audit of new top-level state machine Also, give Jonas copyright for his contribution to Finit. Signed-off-by: Joachim Nilsson --- sm.c | 8 +++++++- sm.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sm.c b/sm.c index d7cfaa2a..9f2b6ff9 100644 --- a/sm.c +++ b/sm.c @@ -1,6 +1,6 @@ /* Finit state machine * - * Copyright (c) 2016 xxx + * Copyright (c) 2016 Jonas Johansson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -50,16 +50,22 @@ static char *sm_status(sm_t *sm) switch (sm->state) { case SM_BOOTSTRAP_STATE: return "bootstrap"; + case SM_RUNNING_STATE: return "running"; + case SM_RUNLEVEL_CHANGE_STATE: return "runlevel/change"; + case SM_RUNLEVEL_WAIT_STATE: return "runlevel/wait"; + case SM_RELOAD_CHANGE_STATE: return "reload/change"; + case SM_RELOAD_WAIT_STATE: return "reload/wait"; + default: return "unknown"; } diff --git a/sm.h b/sm.h index d8246df5..281fb6a4 100644 --- a/sm.h +++ b/sm.h @@ -1,6 +1,6 @@ /* Finit state machine * - * Copyright (c) 2016 xxx + * Copyright (c) 2016 Jonas Johansson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal