diff --git a/finit.c b/finit.c index 7393a84b..dc60608b 100644 --- a/finit.c +++ b/finit.c @@ -54,7 +54,6 @@ char *hostname = NULL; char *rcsd = FINIT_RCSD; char *runparts = NULL; char *console = NULL; -sm_t sm; uev_ctx_t *ctx = NULL; /* Main loop context */ diff --git a/finit.h b/finit.h index 426cba00..867a7a5e 100644 --- a/finit.h +++ b/finit.h @@ -35,8 +35,6 @@ #include #include -#include "sm.h" - #define CMD_SIZE 256 #define LINE_SIZE 1024 #define BUF_SIZE 4096 @@ -80,7 +78,6 @@ extern char *username; extern char *runparts; extern char *console; extern char *__progname; -extern sm_t sm; #endif /* FINIT_H_ */ diff --git a/sm.c b/sm.c index 288473cf..d7cfaa2a 100644 --- a/sm.c +++ b/sm.c @@ -35,6 +35,8 @@ #include "tty.h" #include "sm.h" +sm_t sm; + void sm_init(sm_t *sm) { sm->state = SM_BOOTSTRAP_STATE; diff --git a/sm.h b/sm.h index 9bb8d584..d8246df5 100644 --- a/sm.h +++ b/sm.h @@ -40,6 +40,8 @@ typedef struct sm { int in_teardown; /* Set when waiting for all processes to be halted */ } sm_t; +extern sm_t sm; + void sm_init(sm_t *sm); void sm_step(sm_t *sm); void sm_set_runlevel(sm_t *sm, int newlevel);