summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_remove.c
diff options
context:
space:
mode:
author192.168.1.134 <[email protected]>2021-12-09 19:18:24 +0800
committer192.168.1.134 <[email protected]>2021-12-09 19:18:24 +0800
commit6378f95f00fd51410d2715da55d728d4a40494de (patch)
treebb46a565875d538189e1c1dfc9b1cfddf6862a92 /components/libc/compilers/dlib/syscall_remove.c
parentd6b05287bbeaf9369546009e5af445f350b97fe9 (diff)
parent462f093cbd7531098de3b7aadb5f8d5f1b99b4a9 (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'components/libc/compilers/dlib/syscall_remove.c')
-rw-r--r--components/libc/compilers/dlib/syscall_remove.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c
index 05bfbb67ae..870f91b8c1 100644
--- a/components/libc/compilers/dlib/syscall_remove.c
+++ b/components/libc/compilers/dlib/syscall_remove.c
@@ -8,15 +8,21 @@
* 2015-01-28 Bernard first version
*/
#include <rtthread.h>
-#include <yfuns.h>
+#include <LowLevelIOInterface.h>
#include <unistd.h>
+/*
+ * The "remove" function should remove the file named "filename". It
+ * should return 0 on success and nonzero on failure.
+ */
+
#pragma module_name = "?remove"
-int remove(const char *val)
+
+int remove(const char *filename)
{
-#ifdef RT_USING_POSIX
- return unlink(val);
+#ifdef DFS_USING_POSIX
+ return unlink(filename);
#else
- return -1;
-#endif /* RT_USING_POSIX */
+ return _LLIO_ERROR;
+#endif /* DFS_USING_POSIX */
}