summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_remove.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-11-15 23:27:27 +0800
committerGitHub <[email protected]>2021-11-15 23:27:27 +0800
commit0bcab2892a81960ceb394b5cde4bc78eed3326eb (patch)
tree2f6cf7554548f407edb8a51136c76a7a7658a375 /components/libc/compilers/dlib/syscall_remove.c
parentef05ecf7c47a8265de19ce8367583de690fb1860 (diff)
parent4fe93881b071ea664b9a5b89c073ad46b9d3e312 (diff)
Merge pull request #5268 from mysterywolf/SYSCALL
[libc]重新梳理read write桩函数实现
Diffstat (limited to 'components/libc/compilers/dlib/syscall_remove.c')
-rw-r--r--components/libc/compilers/dlib/syscall_remove.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c
index 05bfbb67ae..cf6541132a 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);
+ return unlink(filename);
#else
- return -1;
+ return _LLIO_ERROR;
#endif /* RT_USING_POSIX */
}