diff options
| author | Bernard Xiong <[email protected]> | 2013-06-23 07:48:42 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2013-06-23 07:48:42 +0800 |
| commit | 98c8a23e9456b6a03f285245fbe9432b825e4f45 (patch) | |
| tree | acd0c83ac2d1015713a4fbc3ccb55955cdb8a868 /components/finsh/shell.c | |
| parent | c5927f51b3dcba72aea4aca26fdb3bffb1d6f763 (diff) | |
Add component initialization.
Diffstat (limited to 'components/finsh/shell.c')
| -rw-r--r-- | components/finsh/shell.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 08dfc2b21a..7ace0c34fc 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -511,7 +511,7 @@ __declspec(allocate("FSymTab$z")) const struct finsh_syscall __fsym_end = * * This function will initialize finsh shell */ -void finsh_system_init(void) +int finsh_system_init(void) { rt_err_t result; @@ -561,7 +561,7 @@ void finsh_system_init(void) if (shell == RT_NULL) { rt_kprintf("no memory for shell\n"); - return; + return -1; } memset(shell, 0, sizeof(struct finsh_shell)); @@ -575,4 +575,7 @@ void finsh_system_init(void) if (result == RT_EOK) rt_thread_startup(&finsh_thread); + return 0; } +INIT_COMPONENT_EXPORT(finsh_system_init); + |
