Changeset 9a8c188 in mainline
- Timestamp:
- 2013-07-24T21:12:25Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1393bbb
- Parents:
- 0b18364
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
r0b18364 r9a8c188 329 329 static int open_internal(const char *abs, size_t abs_size, int lflag, int oflag) 330 330 { 331 // FIXME: Some applications call this incorrectly. 332 if ((oflag & (O_RDONLY|O_WRONLY|O_RDWR)) == 0) { 333 oflag |= O_RDWR; 334 } 335 336 assert((((oflag & O_RDONLY) != 0) + ((oflag & O_WRONLY) != 0) + ((oflag & O_RDWR) != 0)) == 1); 337 331 338 async_exch_t *exch = vfs_exchange_begin(); 332 339 -
uspace/srv/vfs/vfs.c
r0b18364 r9a8c188 89 89 break; 90 90 case VFS_IN_OPEN2: 91 vfs_open (callid, &call);91 vfs_open2(callid, &call); 92 92 break; 93 93 case VFS_IN_OPEN: -
uspace/srv/vfs/vfs.h
r0b18364 r9a8c188 228 228 229 229 extern void vfs_walk(ipc_callid_t, ipc_call_t *); 230 extern void vfs_create(ipc_callid_t, ipc_call_t *);231 230 extern void vfs_open2(ipc_callid_t, ipc_call_t *); 232 231 -
uspace/srv/vfs/vfs_ops.c
r0b18364 r9a8c188 767 767 } 768 768 769 if ((((oflag & O_RDONLY) != 0) + ((oflag & O_WRONLY) != 0) + ((oflag & O_RDWR) != 0)) != 1) { 770 async_answer_0(rid, EINVAL); 771 return; 772 } 773 769 774 if (oflag & O_CREAT) 770 775 lflag |= L_CREATE; … … 840 845 vfs_file_t *file = vfs_file_get(fd); 841 846 842 /* There is a potential race with another fibril of a malicious client. */ 843 if (!file) { 844 vfs_node_put(node); 845 async_answer_0(rid, EBUSY); 846 return; 847 } 847 /* FIXME: There is a potential race with another fibril of a malicious client. */ 848 assert(file); 848 849 849 850 file->node = node; … … 856 857 if (oflag & O_APPEND) 857 858 file->append = true; 859 assert(file->open_read || file->open_write); 858 860 859 861 /*
Note:
See TracChangeset
for help on using the changeset viewer.