diff options
| author | qingehao <[email protected]> | 2021-11-16 17:39:35 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-16 17:39:35 +0800 |
| commit | 0a123c307e406d85a55749be99e2c45b5ee37c52 (patch) | |
| tree | ab27ed7fb1636b5e46f7e6b01fbcf3a21d33336a /components/libc/compilers/dlib/syscall_remove.c | |
| parent | e1c281c95d9b7c4b8917d043b6fc33bf1a38e205 (diff) | |
| parent | c1d7eaa0152bd3873adc4a31aa2bb2452dc7fa97 (diff) | |
Merge branch 'RT-Thread:master' into master
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 */ } |
