Rev 3343 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3343 | Rev 3492 | ||
|---|---|---|---|
| Line 114... | Line 114... | ||
| 114 | if (vfs_phone < 0) |
114 | if (vfs_phone < 0) |
| 115 | vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
115 | vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
| 116 | return vfs_phone; |
116 | return vfs_phone; |
| 117 | } |
117 | } |
| 118 | 118 | ||
| 119 | static int device_get_handle(char *name, dev_handle_t *handle) |
119 | static int device_get_handle(const char *name, dev_handle_t *handle) |
| 120 | { |
120 | { |
| 121 | int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, |
121 | int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, |
| 122 | 0); |
122 | 0); |
| 123 | if (phone < 0) |
123 | if (phone < 0) |
| 124 | return phone; |
124 | return phone; |
| Line 362... | Line 362... | ||
| 362 | futex_up(&vfs_phone_futex); |
362 | futex_up(&vfs_phone_futex); |
| 363 | return res; |
363 | return res; |
| 364 | } |
364 | } |
| 365 | } |
365 | } |
| 366 | 366 | ||
| 367 | off_t newoffs; |
367 | ipcarg_t newoffs; |
| 368 | rc = async_req_3_1(vfs_phone, VFS_SEEK, fildes, offset, whence, |
368 | rc = async_req_3_1(vfs_phone, VFS_SEEK, fildes, offset, whence, |
| 369 | (ipcarg_t)&newoffs); |
369 | &newoffs); |
| 370 | 370 | ||
| 371 | async_serialize_end(); |
371 | async_serialize_end(); |
| 372 | futex_up(&vfs_phone_futex); |
372 | futex_up(&vfs_phone_futex); |
| 373 | 373 | ||
| 374 | if (rc != EOK) |
374 | if (rc != EOK) |
| 375 | return (off_t) -1; |
375 | return (off_t) -1; |
| 376 | 376 | ||
| 377 | return newoffs; |
377 | return (off_t) newoffs; |
| 378 | } |
378 | } |
| 379 | 379 | ||
| 380 | int ftruncate(int fildes, off_t length) |
380 | int ftruncate(int fildes, off_t length) |
| 381 | { |
381 | { |
| 382 | int res; |
382 | int res; |
| Line 597... | Line 597... | ||
| 597 | } |
597 | } |
| 598 | cwd_dir = d; |
598 | cwd_dir = d; |
| 599 | cwd_path = pa; |
599 | cwd_path = pa; |
| 600 | cwd_len = pa_len; |
600 | cwd_len = pa_len; |
| 601 | futex_up(&cwd_futex); |
601 | futex_up(&cwd_futex); |
| - | 602 | return EOK; |
|
| 602 | } |
603 | } |
| 603 | 604 | ||
| 604 | char *getcwd(char *buf, size_t size) |
605 | char *getcwd(char *buf, size_t size) |
| 605 | { |
606 | { |
| 606 | if (!size) |
607 | if (!size) |