summaryrefslogtreecommitdiff
path: root/components/finsh
diff options
context:
space:
mode:
Diffstat (limited to 'components/finsh')
-rw-r--r--components/finsh/SConscript2
-rw-r--r--components/finsh/finsh.h2
-rw-r--r--components/finsh/msh.c18
-rw-r--r--components/finsh/msh_file.c4
-rw-r--r--components/finsh/shell.c16
-rw-r--r--components/finsh/shell.h2
6 files changed, 22 insertions, 22 deletions
diff --git a/components/finsh/SConscript b/components/finsh/SConscript
index 28fe02bac5..5eabe47c0e 100644
--- a/components/finsh/SConscript
+++ b/components/finsh/SConscript
@@ -9,7 +9,7 @@ msh.c
if GetDepend('MSH_USING_BUILT_IN_COMMANDS'):
src += ['cmd.c']
-if GetDepend('RT_USING_DFS'):
+if GetDepend('RT_USING_POSIX'):
src += ['msh_file.c']
CPPPATH = [cwd]
diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h
index 98048ebad4..f5e4df9e49 100644
--- a/components/finsh/finsh.h
+++ b/components/finsh/finsh.h
@@ -169,7 +169,7 @@ extern struct finsh_syscall *_syscall_table_begin, *_syscall_table_end;
struct finsh_syscall *finsh_syscall_lookup(const char *name);
#ifdef RT_USING_DEVICE
- void finsh_set_device(const char *device_name);
+void finsh_set_device(const char *device_name);
#endif
#endif
diff --git a/components/finsh/msh.c b/components/finsh/msh.c
index 18182ca264..5cb54c26e7 100644
--- a/components/finsh/msh.c
+++ b/components/finsh/msh.c
@@ -21,7 +21,7 @@
#include "msh.h"
#include "shell.h"
-#ifdef RT_USING_DFS
+#ifdef RT_USING_POSIX
#include <dfs_posix.h>
#endif
@@ -186,7 +186,7 @@ static cmd_function_t msh_get_cmd(char *cmd, int size)
return cmd_func;
}
-#if defined(RT_USING_MODULE) && defined(RT_USING_DFS)
+#if defined(RT_USING_MODULE) && defined(RT_USING_POSIX)
/* Return 0 on module executed. Other value indicate error.
*/
int msh_exec_module(const char *cmd_line, int size)
@@ -257,7 +257,7 @@ int msh_exec_module(const char *cmd_line, int size)
rt_free(pg_name);
return ret;
}
-#endif /* defined(RT_USING_MODULE) && defined(RT_USING_DFS) */
+#endif /* defined(RT_USING_MODULE) && defined(RT_USING_POSIX) */
static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)
{
@@ -290,7 +290,7 @@ static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)
return 0;
}
-#if defined(RT_USING_LWP) && defined(RT_USING_DFS)
+#if defined(RT_USING_LWP) && defined(RT_USING_POSIX)
static int _msh_exec_lwp(char *cmd, rt_size_t length)
{
int argc;
@@ -350,7 +350,7 @@ int msh_exec(char *cmd, rt_size_t length)
{
return cmd_ret;
}
-#ifdef RT_USING_DFS
+#ifdef RT_USING_POSIX
#ifdef DFS_USING_WORKDIR
if (msh_exec_script(cmd, length) == 0)
{
@@ -371,7 +371,7 @@ int msh_exec(char *cmd, rt_size_t length)
return 0;
}
#endif /* RT_USING_LWP */
-#endif /* RT_USING_DFS */
+#endif /* RT_USING_POSIX */
/* truncate the cmd at the first space. */
{
@@ -400,7 +400,7 @@ static int str_common(const char *str1, const char *str2)
return (str - str1);
}
-#ifdef RT_USING_DFS
+#ifdef RT_USING_POSIX
void msh_auto_complete_path(char *path)
{
DIR *dir = RT_NULL;
@@ -521,7 +521,7 @@ void msh_auto_complete_path(char *path)
closedir(dir);
rt_free(full_path);
}
-#endif /* RT_USING_DFS */
+#endif /* RT_USING_POSIX */
void msh_auto_complete(char *prefix)
{
@@ -538,7 +538,7 @@ void msh_auto_complete(char *prefix)
return;
}
-#ifdef RT_USING_DFS
+#ifdef RT_USING_POSIX
/* check whether a spare in the command */
{
char *ptr;
diff --git a/components/finsh/msh_file.c b/components/finsh/msh_file.c
index 8f067efd98..4e9ed53b31 100644
--- a/components/finsh/msh_file.c
+++ b/components/finsh/msh_file.c
@@ -11,7 +11,7 @@
#include <rtthread.h>
-#if defined(RT_USING_FINSH) && defined(RT_USING_DFS)
+#if defined(RT_USING_FINSH) && defined(RT_USING_POSIX)
#include <finsh.h>
#include "msh.h"
@@ -702,5 +702,5 @@ static int cmd_tail(int argc, char **argv)
}
MSH_CMD_EXPORT_ALIAS(cmd_tail, tail, print the last N - lines data of the given file);
-#endif /* defined(RT_USING_FINSH) && defined(RT_USING_DFS) */
+#endif /* defined(RT_USING_FINSH) && defined(RT_USING_POSIX) */
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)
{
diff --git a/components/finsh/shell.h b/components/finsh/shell.h
index 985d3b3fbd..598596ce00 100644
--- a/components/finsh/shell.h
+++ b/components/finsh/shell.h
@@ -78,7 +78,7 @@ struct finsh_shell
rt_uint16_t line_position;
rt_uint16_t line_curpos;
-#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
+#if !defined(RT_USING_LIBC) && defined(RT_USING_DEVICE)
rt_device_t device;
#endif