diff options
| author | armink <[email protected]> | 2019-07-19 15:44:36 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-07-19 15:44:36 +0800 |
| commit | c33299ab93cb46ab650204dbeb1dad5ad2ab48fb (patch) | |
| tree | a3a8a67b39d546fcbc79d14ed2b9ab19f6fcc1a1 /components/finsh/shell.c | |
| parent | 8f4b4bdbcd877fc21f14d8396d0563261c6dd727 (diff) | |
[finsh] Fix the compile error when only using msh mode on x86_64 platform.
Diffstat (limited to 'components/finsh/shell.c')
| -rw-r--r-- | components/finsh/shell.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 1505e071c5..76ac726597 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -44,6 +44,28 @@ struct finsh_shell _shell; struct finsh_shell *shell; static char *finsh_prompt_custom = RT_NULL; +#if defined(_MSC_VER) || (defined(__GNUC__) && defined(__x86_64__)) +struct finsh_syscall* finsh_syscall_next(struct finsh_syscall* call) +{ + unsigned int *ptr; + ptr = (unsigned int*) (call + 1); + while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _syscall_table_end)) + ptr ++; + + return (struct finsh_syscall*)ptr; +} + +struct finsh_sysvar* finsh_sysvar_next(struct finsh_sysvar* call) +{ + unsigned int *ptr; + ptr = (unsigned int*) (call + 1); + while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _sysvar_table_end)) + ptr ++; + + return (struct finsh_sysvar*)ptr; +} +#endif /* defined(_MSC_VER) || (defined(__GNUC__) && defined(__x86_64__)) */ + #ifdef RT_USING_HEAP int finsh_set_prompt(const char * prompt) { |
