summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-02-15 09:28:48 +0800
committerGitHub <[email protected]>2021-02-15 09:28:48 +0800
commitd1cb9c5d97dea5639bf366765581b7ae09b61e47 (patch)
treea1264dce8e7c2c6fc77bf7032553b03caa707787 /components/libc/compilers/dlib
parent7d72bdf303f1b876c276694007f20622a126b19f (diff)
parentc842f2a067a04ceb5ba3ba414110db058c92c1f5 (diff)
Merge pull request #4341 from mysterywolf/unlink
[libc][iar][gcc] 优化remove函数
Diffstat (limited to 'components/libc/compilers/dlib')
-rw-r--r--components/libc/compilers/dlib/syscall_remove.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c
index e7f0268b1b..f7e64d1997 100644
--- a/components/libc/compilers/dlib/syscall_remove.c
+++ b/components/libc/compilers/dlib/syscall_remove.c
@@ -9,16 +9,16 @@
*/
#include <rtthread.h>
#ifdef RT_USING_DFS
-#include <dfs_file.h>
+#include <dfs_posix.h>
#endif
#include <yfuns.h>
#pragma module_name = "?remove"
int remove(const char *val)
{
-#ifdef RT_USING_DFS
- dfs_file_unlink(val);
+#ifndef RT_USING_DFS
+ return -1;
+#else
+ return unlink(val);
#endif
-
- return 0;
}