mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
[posix][dfs] move dfs_posix dfs_poll dfs_select.c to posix folder
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user