Changeset b19e892 in mainline for uspace/srv/vfs/vfs_ops.c
- Timestamp:
- 2017-04-02T10:39:13Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c4cf0d
- Parents:
- 80743a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r80743a1 rb19e892 49 49 #include <unistd.h> 50 50 #include <ctype.h> 51 #include <fcntl.h>52 51 #include <assert.h> 53 52 #include <vfs/canonify.h> … … 274 273 } 275 274 276 int vfs_op_open(int fd, int flags)277 { 278 if ( flags== 0)275 int vfs_op_open(int fd, int mode) 276 { 277 if (mode == 0) 279 278 return EINVAL; 280 279 … … 283 282 return EBADF; 284 283 285 if (( flags& ~file->permissions) != 0) {284 if ((mode & ~file->permissions) != 0) { 286 285 vfs_file_put(file); 287 286 return EPERM; … … 293 292 } 294 293 295 file->open_read = ( flags& MODE_READ) != 0;296 file->open_write = ( flags& (MODE_WRITE | MODE_APPEND)) != 0;297 file->append = ( flags& MODE_APPEND) != 0;294 file->open_read = (mode & MODE_READ) != 0; 295 file->open_write = (mode & (MODE_WRITE | MODE_APPEND)) != 0; 296 file->append = (mode & MODE_APPEND) != 0; 298 297 299 298 if (!file->open_read && !file->open_write) {
Note:
See TracChangeset
for help on using the changeset viewer.