summaryrefslogtreecommitdiff
path: root/components/dfs/src
diff options
context:
space:
mode:
authorguo <[email protected]>2022-12-16 18:38:28 +0800
committerGitHub <[email protected]>2022-12-16 18:38:28 +0800
commit68ca9f07a60ad5cbe52b37b52299327b6246e7f7 (patch)
treeb990c35d5b20e515adb604b85b2b10dae0cf034b /components/dfs/src
parent3ea5166376dbc05722d793c3183c15b3a01e7f3a (diff)
[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)
* [dfs] sync cromfs * [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration * [format] fix some format issue.
Diffstat (limited to 'components/dfs/src')
-rw-r--r--components/dfs/src/dfs.c12
-rw-r--r--components/dfs/src/dfs_posix.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c
index f3f9c2354b..5ec2c7bab9 100644
--- a/components/dfs/src/dfs.c
+++ b/components/dfs/src/dfs.c
@@ -14,7 +14,7 @@
#include <dfs_fs.h>
#include <dfs_file.h>
#include "dfs_private.h"
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
#include <lwp.h>
#endif
@@ -644,7 +644,7 @@ char *dfs_normalize_path(const char *directory, const char *filename)
#ifdef DFS_USING_WORKDIR
if (directory == NULL) /* shall use working directory */
{
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
directory = lwp_getcwd();
#else
directory = &working_directory[0];
@@ -775,7 +775,7 @@ RTM_EXPORT(dfs_normalize_path);
struct dfs_fdtable *dfs_fdtable_get(void)
{
struct dfs_fdtable *fdt;
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
struct rt_lwp *lwp;
lwp = (struct rt_lwp *)rt_thread_self()->lwp;
@@ -790,7 +790,7 @@ struct dfs_fdtable *dfs_fdtable_get(void)
return fdt;
}
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
struct dfs_fdtable *dfs_fdtable_get_pid(int pid)
{
struct rt_lwp *lwp = RT_NULL;
@@ -854,7 +854,7 @@ int list_fd(void)
return 0;
}
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
static int lsofp(int pid)
{
int index;
@@ -964,7 +964,7 @@ int lsof(int argc, char *argv[])
return 0;
}
MSH_CMD_EXPORT(lsof, list open files);
-#endif /* RT_USING_LWP */
+#endif /* RT_USING_SMART */
#endif
/*@}*/
diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c
index e3efa5bed6..0956e512d7 100644
--- a/components/dfs/src/dfs_posix.c
+++ b/components/dfs/src/dfs_posix.c
@@ -14,7 +14,7 @@
#include <dfs_private.h>
#include <sys/errno.h>
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
#include <lwp.h>
#endif
@@ -866,7 +866,7 @@ int chdir(const char *path)
/* close directory stream */
closedir(d);
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
/* copy full path to working directory */
lwp_setcwd(fullpath);
#else
@@ -916,7 +916,7 @@ void setcwd(char *buf)
{
#ifdef DFS_USING_WORKDIR
dfs_lock();
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
lwp_setcwd(buf);
#else
rt_strncpy(working_directory, buf, DFS_PATH_MAX);
@@ -946,7 +946,7 @@ char *getcwd(char *buf, size_t size)
dfs_lock();
-#ifdef RT_USING_LWP
+#ifdef RT_USING_SMART
dir_buf = lwp_getcwd();
#else
dir_buf = &working_directory[0];