Changeset 0d0b319 in mainline for uspace/lib/posix/source/fcntl.c
- Timestamp:
- 2018-01-04T20:03:02Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3c7702c0
- Parents:
- 10de842
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 19:18:29)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:03:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/fcntl.c
r10de842 r0d0b319 40 40 41 41 #include "libc/vfs/vfs.h" 42 #include "posix/errno.h" 42 43 #include <errno.h> 43 44 44 45 /** … … 103 104 int posix_open(const char *pathname, int posix_flags, ...) 104 105 { 105 int rc;106 106 posix_mode_t posix_mode = 0; 107 107 if (posix_flags & O_CREAT) { … … 136 136 137 137 int file; 138 rc = rcerrno(vfs_lookup, pathname, flags, &file); 139 if ( rc != EOK)138 139 if (failed(vfs_lookup(pathname, flags, &file))) 140 140 return -1; 141 141 142 rc = rcerrno(vfs_open, file, mode); 143 if (rc != EOK) { 142 if (failed(vfs_open(file, mode))) { 144 143 vfs_put(file); 145 144 return -1; … … 148 147 if (posix_flags & O_TRUNC) { 149 148 if (posix_flags & (O_RDWR | O_WRONLY)) { 150 rc = rcerrno(vfs_resize, file, 0); 151 if (rc != EOK) { 149 if (failed(vfs_resize(file, 0))) { 152 150 vfs_put(file); 153 151 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.