From c779104ef78736491c10ac45a14cc9242c2f94af Mon Sep 17 00:00:00 2001 From: armink Date: Fri, 13 Jul 2018 11:14:36 +0800 Subject: [PATCH] [dfs] Fix dfs_file_ioctl return check on fcntl. --- components/dfs/src/dfs_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 3c3c511d74..3d863c4f98 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -449,7 +449,7 @@ int fcntl(int fildes, int cmd, ...) } else ret = -EBADF; - if (ret != 0) + if (ret < 0) { rt_set_errno(ret); ret = -1;