Changeset 4198f9c3 in mainline for uspace/srv/vfs
- Timestamp:
- 2009-06-28T13:43:15Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 852b801
- Parents:
- 6408be3
- Location:
- uspace/srv/vfs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
r6408be3 r4198f9c3 80 80 keep_on_going = false; 81 81 break; 82 case VFS_ REGISTER:82 case VFS_IN_REGISTER: 83 83 vfs_register(callid, &call); 84 84 keep_on_going = false; 85 85 break; 86 case VFS_ MOUNT:86 case VFS_IN_MOUNT: 87 87 vfs_mount(callid, &call); 88 88 break; 89 case VFS_ OPEN:89 case VFS_IN_OPEN: 90 90 vfs_open(callid, &call); 91 91 break; 92 case VFS_ OPEN_NODE:92 case VFS_IN_OPEN_NODE: 93 93 vfs_open_node(callid, &call); 94 94 break; 95 case VFS_ CLOSE:95 case VFS_IN_CLOSE: 96 96 vfs_close(callid, &call); 97 97 break; 98 case VFS_ READ:98 case VFS_IN_READ: 99 99 vfs_read(callid, &call); 100 100 break; 101 case VFS_ WRITE:101 case VFS_IN_WRITE: 102 102 vfs_write(callid, &call); 103 103 break; 104 case VFS_ SEEK:104 case VFS_IN_SEEK: 105 105 vfs_seek(callid, &call); 106 106 break; 107 case VFS_ TRUNCATE:107 case VFS_IN_TRUNCATE: 108 108 vfs_truncate(callid, &call); 109 109 break; 110 case VFS_ MKDIR:110 case VFS_IN_MKDIR: 111 111 vfs_mkdir(callid, &call); 112 112 break; 113 case VFS_ UNLINK:113 case VFS_IN_UNLINK: 114 114 vfs_unlink(callid, &call); 115 115 break; 116 case VFS_ RENAME:116 case VFS_IN_RENAME: 117 117 vfs_rename(callid, &call); 118 118 break; 119 case VFS_ DEVICE:119 case VFS_IN_DEVICE: 120 120 vfs_device(callid, &call); 121 121 break; 122 case VFS_ SYNC:122 case VFS_IN_SYNC: 123 123 vfs_sync(callid, &call); 124 124 break; 125 case VFS_ NODE:125 case VFS_IN_NODE: 126 126 vfs_node(callid, &call); 127 127 break; -
uspace/srv/vfs/vfs_lookup.c
r6408be3 r4198f9c3 160 160 ipc_call_t answer; 161 161 int phone = vfs_grab_phone(root->fs_handle); 162 aid_t req = async_send_5(phone, VFS_ LOOKUP, (ipcarg_t) first,162 aid_t req = async_send_5(phone, VFS_OUT_LOOKUP, (ipcarg_t) first, 163 163 (ipcarg_t) (first + len - 1) % PLB_SIZE, 164 164 (ipcarg_t) root->dev_handle, (ipcarg_t) lflag, (ipcarg_t) index, … … 205 205 206 206 ipc_call_t answer; 207 aid_t req = async_send_2(phone, VFS_O PEN_NODE,207 aid_t req = async_send_2(phone, VFS_OUT_OPEN_NODE, 208 208 (ipcarg_t) result->triplet.dev_handle, 209 209 (ipcarg_t) result->triplet.index, &answer); -
uspace/srv/vfs/vfs_node.c
r6408be3 r4198f9c3 130 130 int phone = vfs_grab_phone(node->fs_handle); 131 131 ipcarg_t rc; 132 rc = async_req_2_0(phone, VFS_ DESTROY,132 rc = async_req_2_0(phone, VFS_OUT_DESTROY, 133 133 (ipcarg_t)node->dev_handle, (ipcarg_t)node->index); 134 134 assert(rc == EOK); -
uspace/srv/vfs/vfs_ops.c
r6408be3 r4198f9c3 109 109 /* 110 110 * Now we hold a reference to mp_node. 111 * It will be dropped upon the corresponding VFS_ UNMOUNT.111 * It will be dropped upon the corresponding VFS_IN_UNMOUNT. 112 112 * This prevents the mount point from being deleted. 113 113 */ … … 122 122 /* Tell the mountee that it is being mounted. */ 123 123 phone = vfs_grab_phone(fs_handle); 124 msg = async_send_1(phone, VFS_ MOUNTED,124 msg = async_send_1(phone, VFS_OUT_MOUNTED, 125 125 (ipcarg_t) dev_handle, &answer); 126 126 /* send the mount options */ … … 184 184 185 185 phone = vfs_grab_phone(mp_res.triplet.fs_handle); 186 msg = async_send_4(phone, VFS_ MOUNT,186 msg = async_send_4(phone, VFS_OUT_MOUNT, 187 187 (ipcarg_t) mp_res.triplet.dev_handle, 188 188 (ipcarg_t) mp_res.triplet.index, … … 438 438 /* 439 439 * The POSIX interface is open(path, oflag, mode). 440 * We can receive oflags and mode along with the VFS_ OPEN call; the path441 * will need to arrive in another call.440 * We can receive oflags and mode along with the VFS_IN_OPEN call; 441 * the path will need to arrive in another call. 442 442 * 443 443 * We also receive one private, non-POSIX set of flags called lflag … … 556 556 * It is necessary so that the file will not disappear when 557 557 * vfs_node_put() is called. The reference will be dropped by the 558 * respective VFS_ CLOSE.558 * respective VFS_IN_CLOSE. 559 559 */ 560 560 vfs_node_addref(node); … … 633 633 * It is necessary so that the file will not disappear when 634 634 * vfs_node_put() is called. The reference will be dropped by the 635 * respective VFS_ CLOSE.635 * respective VFS_IN_CLOSE. 636 636 */ 637 637 vfs_node_addref(node); … … 675 675 int fs_phone = vfs_grab_phone(file->node->fs_handle); 676 676 677 /* Make a VFS_ DEVICE request at the destination FS server. */677 /* Make a VFS_OUT_DEVICE request at the destination FS server. */ 678 678 aid_t msg; 679 679 ipc_call_t answer; 680 msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),681 file->node-> dev_handle, file->node->index, &answer);680 msg = async_send_2(fs_phone, VFS_OUT_DEVICE, file->node->dev_handle, 681 file->node->index, &answer); 682 682 683 683 /* Wait for reply from the FS server. */ … … 709 709 int fs_phone = vfs_grab_phone(file->node->fs_handle); 710 710 711 /* Make a VFS_ SYMC request at the destination FS server. */711 /* Make a VFS_OUT_SYMC request at the destination FS server. */ 712 712 aid_t msg; 713 713 ipc_call_t answer; 714 msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),715 file->node-> dev_handle, file->node->index, &answer);714 msg = async_send_2(fs_phone, VFS_OUT_SYNC, file->node->dev_handle, 715 file->node->index, &answer); 716 716 717 717 /* Wait for reply from the FS server. */ … … 743 743 int fs_phone = vfs_grab_phone(file->node->fs_handle); 744 744 745 /* Make a VFS_ CLOSE request at the destination FS server. */745 /* Make a VFS_OUT_CLOSE request at the destination FS server. */ 746 746 aid_t msg; 747 747 ipc_call_t answer; 748 msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),749 file->node-> dev_handle, file->node->index, &answer);748 msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->dev_handle, 749 file->node->index, &answer); 750 750 751 751 /* Wait for reply from the FS server. */ … … 833 833 if (!read && file->append) 834 834 file->pos = file->node->size; 835 msg = async_send_3(fs_phone, IPC_GET_METHOD(*request),835 msg = async_send_3(fs_phone, read ? VFS_OUT_READ : VFS_OUT_WRITE, 836 836 file->node->dev_handle, file->node->index, file->pos, &answer); 837 837 … … 947 947 948 948 fs_phone = vfs_grab_phone(fs_handle); 949 rc = async_req_3_0(fs_phone, VFS_ TRUNCATE, (ipcarg_t)dev_handle,949 rc = async_req_3_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t)dev_handle, 950 950 (ipcarg_t)index, (ipcarg_t)size); 951 951 vfs_release_phone(fs_phone); … … 1051 1051 * The name has already been unlinked by vfs_lookup_internal(). 1052 1052 * We have to get and put the VFS node to ensure that it is 1053 * VFS_ DESTROY'ed after the last reference to it is dropped.1053 * VFS_OUT_DESTROY'ed after the last reference to it is dropped. 1054 1054 */ 1055 1055 vfs_node_t *node = vfs_node_get(&lr);
Note:
See TracChangeset
for help on using the changeset viewer.