summaryrefslogtreecommitdiff
path: root/components/finsh/shell.c
diff options
context:
space:
mode:
authorguo <[email protected]>2021-10-26 09:37:43 +0800
committerGitHub <[email protected]>2021-10-26 09:37:43 +0800
commit50bb6e33d13237f71812e81a6a13ba5ba0693c8f (patch)
treead7924c4e07a3748b1b83fbe57d8f7231f7635a4 /components/finsh/shell.c
parentc8ee4cc67dd1815d1b0ead1bcd24156da6ab87de (diff)
parentf7548b934e210ea66e2734c3c6abbddcd1605f11 (diff)
Merge pull request #5212 from mysterywolf/posix
[posix][dfs] move dfs_posix dfs_poll dfs_select.c to posix folder
Diffstat (limited to 'components/finsh/shell.c')
-rw-r--r--components/finsh/shell.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index 20f1bdef0f..292ea588cf 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -27,9 +27,9 @@
#include "shell.h"
#include "msh.h"
-#if defined(RT_USING_DFS)
- #include <dfs_posix.h>
-#endif /* RT_USING_DFS */
+#ifdef RT_USING_POSIX
+#include <dfs_posix.h>
+#endif /* RT_USING_POSIX */
/* finsh thread */
#ifndef RT_USING_HEAP
@@ -104,7 +104,7 @@ const char *finsh_get_prompt(void)
}
strcpy(finsh_prompt, _MSH_PROMPT);
-#if defined(RT_USING_DFS) && defined(DFS_USING_WORKDIR)
+#if defined(RT_USING_POSIX) && defined(DFS_USING_WORKDIR)
/* get current working directory */
getcwd(&finsh_prompt[rt_strlen(finsh_prompt)], RT_CONSOLEBUF_SIZE - rt_strlen(finsh_prompt));
#endif
@@ -145,7 +145,7 @@ void finsh_set_prompt_mode(rt_uint32_t prompt_mode)
int finsh_getchar(void)
{
#ifdef RT_USING_DEVICE
-#ifdef RT_USING_POSIX
+#ifdef RT_USING_LIBC
return getchar();
#else
char ch = 0;
@@ -163,14 +163,14 @@ int finsh_getchar(void)
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
return ch;
-#endif /* RT_USING_POSIX */
+#endif /* RT_USING_LIBC */
#else
extern char rt_hw_console_getchar(void);
return rt_hw_console_getchar();
#endif /* RT_USING_DEVICE */
}
-#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
+#if !defined(RT_USING_LIBC) && defined(RT_USING_DEVICE)
static rt_err_t finsh_rx_ind(rt_device_t dev, rt_size_t size)
{
RT_ASSERT(shell != RT_NULL);
@@ -436,7 +436,7 @@ void finsh_thread_entry(void *parameter)
shell->echo_mode = 0;
#endif
-#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
+#if !defined(RT_USING_LIBC) && defined(RT_USING_DEVICE)
/* set console device as shell device */
if (shell->device == RT_NULL)
{