9
0
Fork 0

include: move shell prototypes to shell.h

We have a shell,h, so move shell specific prototypes there.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-04-12 09:21:12 +02:00
parent 086d0026a0
commit 4e9f324d37
4 changed files with 13 additions and 11 deletions

View File

@ -16,6 +16,7 @@
#include <glob.h>
#include <menu.h>
#include <fs.h>
#include <shell.h>
#include <libfile.h>
#include <linux/stat.h>

View File

@ -30,6 +30,7 @@
* @brief Main entry into the C part of barebox
*/
#include <common.h>
#include <shell.h>
#include <init.h>
#include <command.h>
#include <malloc.h>

View File

@ -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)

View File

@ -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__ */