Changeset 0ee4322 in mainline for uspace/lib/libc/generic/vfs.c
- Timestamp:
- 2008-01-13T13:19:37Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d0dc74ae
- Parents:
- 4fb6bf36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/vfs.c
r4fb6bf36 r0ee4322 95 95 96 96 97 int open(const char * name, int oflag, ...)97 int open(const char *path, int oflag, ...) 98 98 { 99 99 int res; … … 113 113 } 114 114 req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer); 115 rc = ipc_data_write_start(vfs_phone, name, strlen(name));115 rc = ipc_data_write_start(vfs_phone, path, strlen(path)); 116 116 if (rc != EOK) { 117 117 async_wait_for(req, NULL); … … 215 215 } 216 216 217 int ftruncate(int fildes, off_t length) 218 { 219 int res; 220 ipcarg_t rc; 221 222 futex_down(&vfs_phone_futex); 223 async_serialize_start(); 224 if (vfs_phone < 0) { 225 res = vfs_connect(); 226 if (res < 0) { 227 async_serialize_end(); 228 futex_up(&vfs_phone_futex); 229 return res; 230 } 231 } 232 rc = async_req_2_0(vfs_phone, VFS_TRUNCATE, fildes, length); 233 async_serialize_end(); 234 futex_up(&vfs_phone_futex); 235 return (int) rc; 236 } 237 217 238 /** @} 218 239 */
Note:
See TracChangeset
for help on using the changeset viewer.