94,7 → 94,7 |
} |
|
|
int open(const char *name, int oflag, ...) |
int open(const char *path, int oflag, ...) |
{ |
int res; |
ipcarg_t rc; |
112,7 → 112,7 |
} |
} |
req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer); |
rc = ipc_data_write_start(vfs_phone, name, strlen(name)); |
rc = ipc_data_write_start(vfs_phone, path, strlen(path)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
214,5 → 214,26 |
return newoffs; |
} |
|
int ftruncate(int fildes, off_t length) |
{ |
int res; |
ipcarg_t rc; |
|
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
rc = async_req_2_0(vfs_phone, VFS_TRUNCATE, fildes, length); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return (int) rc; |
} |
|
/** @} |
*/ |