diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c index e7f0268b1be47a80fa56685e21483f858b29f8f7..ca949a5bc18f61e62f0b6a162ac7438b79c1f9ee 100644 --- a/components/libc/compilers/dlib/syscall_remove.c +++ b/components/libc/compilers/dlib/syscall_remove.c @@ -16,9 +16,9 @@ #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(filename); #endif - - return 0; } diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c index 193080c92684443df6eb17ce2ee9828cc009b6d2..f7dd922e1ba97e3959b7fb145d64f3b0aa03013d 100644 --- a/components/libc/compilers/newlib/syscalls.c +++ b/components/libc/compilers/newlib/syscalls.c @@ -196,12 +196,9 @@ int _unlink_r(struct _reent *ptr, const char *file) { #ifndef RT_USING_DFS - return 0; + return -1; #else - int rc; - - rc = unlink(file); - return rc; + return unlink(file); #endif }