Changes in uspace/srv/vfs/vfs_file.c [25a179e:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_file.c
r25a179e rb7fd2a0 64 64 } vfs_boxed_handle_t; 65 65 66 static int _vfs_fd_free(vfs_client_data_t *, int);66 static errno_t _vfs_fd_free(vfs_client_data_t *, int); 67 67 68 68 /** Initialize the table of open files. */ … … 133 133 134 134 /** Close the file in the endpoint FS server. */ 135 static int vfs_file_close_remote(vfs_file_t *file)135 static errno_t vfs_file_close_remote(vfs_file_t *file) 136 136 { 137 137 assert(!file->refcnt); … … 145 145 vfs_exchange_release(exch); 146 146 147 int rc;147 errno_t rc; 148 148 async_wait_for(msg, &rc); 149 149 … … 168 168 * decremented. 169 169 */ 170 static int vfs_file_delref(vfs_client_data_t *vfs_data, vfs_file_t *file)171 { 172 int rc = EOK;170 static errno_t vfs_file_delref(vfs_client_data_t *vfs_data, vfs_file_t *file) 171 { 172 errno_t rc = EOK; 173 173 174 174 assert(fibril_mutex_is_locked(&vfs_data->lock)); … … 192 192 } 193 193 194 static int _vfs_fd_alloc(vfs_client_data_t *vfs_data, vfs_file_t **file, bool desc, int *out_fd)194 static errno_t _vfs_fd_alloc(vfs_client_data_t *vfs_data, vfs_file_t **file, bool desc, int *out_fd) 195 195 { 196 196 if (!vfs_files_init(vfs_data)) … … 254 254 * @return Error code. 255 255 */ 256 int vfs_fd_alloc(vfs_file_t **file, bool desc, int *out_fd)256 errno_t vfs_fd_alloc(vfs_file_t **file, bool desc, int *out_fd) 257 257 { 258 258 return _vfs_fd_alloc(VFS_DATA, file, desc, out_fd); 259 259 } 260 260 261 static int _vfs_fd_free_locked(vfs_client_data_t *vfs_data, int fd)261 static errno_t _vfs_fd_free_locked(vfs_client_data_t *vfs_data, int fd) 262 262 { 263 263 if ((fd < 0) || (fd >= MAX_OPEN_FILES) || !vfs_data->files[fd]) { … … 265 265 } 266 266 267 int rc = vfs_file_delref(vfs_data, vfs_data->files[fd]);267 errno_t rc = vfs_file_delref(vfs_data, vfs_data->files[fd]); 268 268 vfs_data->files[fd] = NULL; 269 269 return rc; 270 270 } 271 271 272 static int _vfs_fd_free(vfs_client_data_t *vfs_data, int fd)273 { 274 int rc;272 static errno_t _vfs_fd_free(vfs_client_data_t *vfs_data, int fd) 273 { 274 errno_t rc; 275 275 276 276 if (!vfs_files_init(vfs_data)) … … 291 291 * descriptor. 292 292 */ 293 int vfs_fd_free(int fd)293 errno_t vfs_fd_free(int fd) 294 294 { 295 295 return _vfs_fd_free(VFS_DATA, fd); … … 305 305 * 306 306 */ 307 int vfs_fd_assign(vfs_file_t *file, int fd)307 errno_t vfs_fd_assign(vfs_file_t *file, int fd) 308 308 { 309 309 if (!vfs_files_init(VFS_DATA)) … … 429 429 } 430 430 431 int vfs_wait_handle_internal(bool high_fd, int *out_fd)431 errno_t vfs_wait_handle_internal(bool high_fd, int *out_fd) 432 432 { 433 433 vfs_client_data_t *vfs_data = VFS_DATA; … … 443 443 444 444 vfs_file_t *file; 445 int rc = _vfs_fd_alloc(vfs_data, &file, high_fd, out_fd);445 errno_t rc = _vfs_fd_alloc(vfs_data, &file, high_fd, out_fd); 446 446 if (rc != EOK) { 447 447 vfs_node_delref(bh->node);
Note:
See TracChangeset
for help on using the changeset viewer.