Skip to content

Commit cc883ad

Browse files
authored
Merge pull request #1891 from qgyhd1234/dfs
[dfs] fix ioctl getflag/setflag issue.
2 parents aa4d090 + 8431c05 commit cc883ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/dfs/src/dfs_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args)
189189
int mask = O_NONBLOCK | O_APPEND;
190190

191191
flags &= mask;
192-
fd->flags &= mask;
192+
fd->flags &= ~mask;
193193
fd->flags |= flags;
194194
}
195195
return 0;

components/dfs/src/dfs_posix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ int fcntl(int fildes, int cmd, ...)
455455
ret = -1;
456456
}
457457

458-
return 0;
458+
return ret;
459459
}
460460
RTM_EXPORT(fcntl);
461461

0 commit comments

Comments
 (0)