diff options
| author | zylx <[email protected]> | 2018-10-13 10:18:10 +0800 |
|---|---|---|
| committer | zylx <[email protected]> | 2018-10-13 10:23:47 +0800 |
| commit | 8431c056350aed7f234a5e463a3e786b2c7ac66a (patch) | |
| tree | c1a4caf0c7617ca18d9a6a4bee8693d33e04472b /components/dfs | |
| parent | 2c6c4a747b9d3cf96b31728772ba287fddfe9586 (diff) | |
[dfs] fix ioctl getflag/setflag issue.
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/src/dfs_file.c | 2 | ||||
| -rw-r--r-- | components/dfs/src/dfs_posix.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index c437b43829..76cf419c0a 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -189,7 +189,7 @@ int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args) int mask = O_NONBLOCK | O_APPEND; flags &= mask; - fd->flags &= mask; + fd->flags &= ~mask; fd->flags |= flags; } return 0; diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 3d863c4f98..898488a2aa 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -455,7 +455,7 @@ int fcntl(int fildes, int cmd, ...) ret = -1; } - return 0; + return ret; } RTM_EXPORT(fcntl); |
