mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Relocate global sm variable to reduce include file deps
The new state machine handling is not necessary to export to external plugins, so this patch reduces the exposure of the global variable sm Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#include <unistd.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#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_ */
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "tty.h"
|
||||
#include "sm.h"
|
||||
|
||||
sm_t sm;
|
||||
|
||||
void sm_init(sm_t *sm)
|
||||
{
|
||||
sm->state = SM_BOOTSTRAP_STATE;
|
||||
|
||||
Reference in New Issue
Block a user