diff options
| author | Bernard Xiong <[email protected]> | 2021-11-15 23:27:27 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-15 23:27:27 +0800 |
| commit | 0bcab2892a81960ceb394b5cde4bc78eed3326eb (patch) | |
| tree | 2f6cf7554548f407edb8a51136c76a7a7658a375 /components/libc/compilers/dlib/syscall_remove.c | |
| parent | ef05ecf7c47a8265de19ce8367583de690fb1860 (diff) | |
| parent | 4fe93881b071ea664b9a5b89c073ad46b9d3e312 (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.c | 14 |
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 */ } |
