From 4e9f324d37e98823eb7179a239d412e9786d9938 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 12 Apr 2016 09:21:12 +0200 Subject: [PATCH] include: move shell prototypes to shell.h We have a shell,h, so move shell specific prototypes there. Signed-off-by: Sascha Hauer --- common/menutree.c | 1 + common/startup.c | 1 + include/common.h | 11 ----------- include/shell.h | 11 +++++++++++ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/common/menutree.c b/common/menutree.c index 160ba9ac4..1505ec854 100644 --- a/common/menutree.c +++ b/common/menutree.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/common/startup.c b/common/startup.c index 093a23ba0..432be67cd 100644 --- a/common/startup.c +++ b/common/startup.c @@ -30,6 +30,7 @@ * @brief Main entry into the C part of barebox */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index cab98d62d..ea349beb9 100644 --- a/include/common.h +++ b/include/common.h @@ -102,17 +102,6 @@ extern int (*barebox_main)(void); void __noreturn start_barebox(void); void shutdown_barebox(void); -int run_shell(void); - -#ifdef CONFIG_SHELL_HUSH -char *shell_expand(char *str); -#else -static inline char *shell_expand(char *str) -{ - return strdup(str); -} -#endif - #define ALIGN_DOWN(x, a) ((x) & ~((typeof(x))(a) - 1)) #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) diff --git a/include/shell.h b/include/shell.h index b98cac3dc..65dad0e1d 100644 --- a/include/shell.h +++ b/include/shell.h @@ -9,4 +9,15 @@ int shell_get_last_return_code(void); +int run_shell(void); + +#ifdef CONFIG_SHELL_HUSH +char *shell_expand(char *str); +#else +static inline char *shell_expand(char *str) +{ + return strdup(str); +} +#endif + #endif /* __SHELL_H__ */