Changeset a92da0a in mainline for uspace/srv/vfs/vfs_read.c
- Timestamp:
- 2007-12-23T21:46:52Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7dab6b8
- Parents:
- a55d5f9f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_read.c
ra55d5f9f ra92da0a 54 54 */ 55 55 56 /*57 * Because we don't support the receive analogy of IPC_M_DATA_SEND,58 * VFS_READ is emulutating its behavior via sharing an address space59 * area.60 */61 62 56 int fd = IPC_GET_ARG1(*request); 63 size_t size = IPC_GET_ARG2(*request);64 57 65 58 /* … … 73 66 74 67 /* 75 * Now we need to receive a call with client's address space area.68 * Now we need to receive a call with client's IPC_M_DATA_READ request. 76 69 */ 77 70 ipc_callid_t callid; 78 ipc_call_t call; 79 callid = async_get_call(&call); 80 if (IPC_GET_METHOD(call) != IPC_M_AS_AREA_SEND) { 71 if (!ipc_data_read_receive(&callid, NULL)) { 81 72 ipc_answer_0(callid, EINVAL); 82 73 ipc_answer_0(rid, EINVAL); … … 91 82 aid_t msg; 92 83 ipc_call_t answer; 93 msg = async_send_ 4(fs_phone, VFS_READ, file->node->dev_handle,94 file->node->index, file->pos, size,&answer);84 msg = async_send_3(fs_phone, VFS_READ, file->node->dev_handle, 85 file->node->index, file->pos, &answer); 95 86 96 87 /* 97 * Forward the address space area offer to the destination FS server. 98 * The call will be routed as if sent by ourselves. 88 * Forward the IPC_M_DATA_READ request to the destination FS server. 89 * The call will be routed as if sent by ourselves. Note that call 90 * arguments are immutable in this case so we don't have to bother. 99 91 */ 100 ipc_forward_fast(callid, fs_phone, IPC_GET_METHOD(call), 101 IPC_GET_ARG1(call), 0, IPC_FF_ROUTE_FROM_ME); 92 ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); 102 93 103 94 vfs_release_phone(fs_phone);
Note:
See TracChangeset
for help on using the changeset viewer.