summaryrefslogtreecommitdiff
path: root/components/finsh/shell.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-10-20 21:44:01 -0400
committerMeco Man <[email protected]>2021-10-21 19:05:53 -0400
commitf7548b934e210ea66e2734c3c6abbddcd1605f11 (patch)
treeb2c302b4baf8dd4e1f9904b62c118a71a3b9e634 /components/finsh/shell.c
parentbcdd4a62560be546c1b82fa7fa8d6b6507f339e9 (diff)
[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)
{