summaryrefslogtreecommitdiff
path: root/components/dfs/src
diff options
context:
space:
mode:
authorshaojinchun <[email protected]>2018-11-22 18:21:45 +0800
committershaojinchun <[email protected]>2018-11-22 18:21:45 +0800
commit2a57ba9f966d43639b5e485c1d939552ae3e5a7b (patch)
treeadf6b382102c03e18ffca90aadc236a31312b844 /components/dfs/src
parentfc6bc1ad398d5fa2085320cab6cc33905f5f943d (diff)
统一getcwd和chdir的加锁方式
Diffstat (limited to 'components/dfs/src')
-rw-r--r--components/dfs/src/dfs_posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c
index 97531ad59c..f47a60ee5d 100644
--- a/components/dfs/src/dfs_posix.c
+++ b/components/dfs/src/dfs_posix.c
@@ -890,9 +890,9 @@ int access(const char *path, int amode)
char *getcwd(char *buf, size_t size)
{
#ifdef DFS_USING_WORKDIR
- rt_enter_critical();
+ dfs_lock();
strncpy(buf, working_directory, size);
- rt_exit_critical();
+ dfs_unlock();
#else
rt_kprintf(NO_WORKING_DIR);
#endif