diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index 82c0f38b4f..e1818dc90e 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -71,7 +71,7 @@ FILEHANDLE _sys_open(const char *name, int openmode) #ifndef DFS_USING_POSIX LOG_W("%s: %s", __func__, _WARNING_WITHOUT_FS); - return 0; /* error */ + return -1; /* error */ #else /* Correct openmode from fopen to open */ if (openmode & OPEN_PLUS) @@ -101,7 +101,7 @@ FILEHANDLE _sys_open(const char *name, int openmode) fd = open(name, mode, 0); if (fd < 0) - return 0; /* error */ + return -1; /* error */ else return fd; #endif /* DFS_USING_POSIX */ @@ -116,7 +116,7 @@ int _sys_close(FILEHANDLE fh) return close(fh); #else LOG_W("%s: %s", __func__, _WARNING_WITHOUT_FS); - return 0; + return 0; /* error */ #endif /* DFS_USING_POSIX */ }