Changeset cad9c72 in mainline
- Timestamp:
- 2008-01-08T21:58:58Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb27ce5a
- Parents:
- 861e7d1
- Location:
- uspace/srv
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.c
r861e7d1 rcad9c72 1 1 /* 2 2 * Copyright (c) 2006 Martin Decky 3 * Copyright (c) 200 7Jakub Jermar3 * Copyright (c) 2008 Jakub Jermar 4 4 * All rights reserved. 5 5 * … … 51 51 .name = "fat", 52 52 .ops = { 53 [IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] = VFS_OP_DEFINED,54 [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_DEFINED,55 [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_DEFINED,56 53 [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED, 57 54 [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED, 58 [IPC_METHOD_TO_VFS_OP(VFS_CREATE)] = VFS_OP_DEFINED,59 55 [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED, 60 56 [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED, 61 57 [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_NULL, 62 [IPC_METHOD_TO_VFS_OP(VFS_SEEK)] = VFS_OP_DEFAULT 58 [IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_NULL, 59 [IPC_METHOD_TO_VFS_OP(VFS_RENAME)] = VFS_OP_NULL, 60 [IPC_METHOD_TO_VFS_OP(VFS_OPENDIR)] = VFS_OP_NULL, 61 [IPC_METHOD_TO_VFS_OP(VFS_READDIR)] = VFS_OP_NULL, 62 [IPC_METHOD_TO_VFS_OP(VFS_CLOSEDIR)] = VFS_OP_NULL, 63 [IPC_METHOD_TO_VFS_OP(VFS_UNLINK)] = VFS_OP_NULL, 64 [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_NULL, 65 [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL, 63 66 } 64 67 }; … … 102 105 callid = async_get_call(&call); 103 106 switch (IPC_GET_METHOD(call)) { 104 case VFS_REGISTER:105 ipc_answer_0(callid, EOK);106 break;107 107 case VFS_LOOKUP: 108 108 fat_lookup(callid, &call); -
uspace/srv/fs/tmpfs/tmpfs.c
r861e7d1 rcad9c72 1 1 /* 2 2 * Copyright (c) 2006 Martin Decky 3 * Copyright (c) 200 7Jakub Jermar3 * Copyright (c) 2008 Jakub Jermar 4 4 * All rights reserved. 5 5 * … … 55 55 .name = "tmpfs", 56 56 .ops = { 57 [IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] = VFS_OP_DEFINED,58 [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_DEFINED,59 [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_DEFINED,60 57 [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED, 61 58 [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED, 62 [IPC_METHOD_TO_VFS_OP(VFS_CREATE)] = VFS_OP_DEFINED,63 59 [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED, 64 60 [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED, 65 61 [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_DEFINED, 66 [IPC_METHOD_TO_VFS_OP(VFS_SEEK)] = VFS_OP_DEFAULT 62 [IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_NULL, 63 [IPC_METHOD_TO_VFS_OP(VFS_RENAME)] = VFS_OP_NULL, 64 [IPC_METHOD_TO_VFS_OP(VFS_OPENDIR)] = VFS_OP_NULL, 65 [IPC_METHOD_TO_VFS_OP(VFS_READDIR)] = VFS_OP_NULL, 66 [IPC_METHOD_TO_VFS_OP(VFS_CLOSEDIR)] = VFS_OP_NULL, 67 [IPC_METHOD_TO_VFS_OP(VFS_UNLINK)] = VFS_OP_NULL, 68 [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_NULL, 69 [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL, 67 70 } 68 71 }; … … 107 110 callid = async_get_call(&call); 108 111 switch (IPC_GET_METHOD(call)) { 109 case VFS_REGISTER:110 ipc_answer_0(callid, EOK);111 break;112 112 case VFS_LOOKUP: 113 113 tmpfs_lookup(callid, &call); -
uspace/srv/vfs/vfs.c
r861e7d1 rcad9c72 103 103 vfs_seek(callid, &call); 104 104 break; 105 case VFS_TRUNCATE: 105 106 case VFS_UNMOUNT: 106 case VFS_CREATE:107 107 case VFS_CLOSE: 108 108 case VFS_UNLINK: 109 109 case VFS_RENAME: 110 case VFS_OPENDIR: 111 case VFS_READDIR: 112 case VFS_CLOSEDIR: 110 113 default: 111 114 ipc_answer_0(callid, ENOTSUP); -
uspace/srv/vfs/vfs.h
r861e7d1 rcad9c72 48 48 49 49 typedef enum { 50 VFS_REGISTER = VFS_FIRST, 51 VFS_MOUNT, 52 VFS_UNMOUNT, 53 VFS_LOOKUP, 54 VFS_OPEN, 55 VFS_CREATE, 50 VFS_OPEN = VFS_FIRST, 56 51 VFS_CLOSE, 57 52 VFS_READ, 58 53 VFS_WRITE, 54 VFS_TRUNCATE, 55 VFS_RENAME, 56 VFS_OPENDIR, 57 VFS_READDIR, 58 VFS_CLOSEDIR, 59 VFS_UNLINK, 60 VFS_MOUNT, 61 VFS_UNMOUNT, 62 VFS_LAST_CMN, /* keep this the last member of this enum */ 63 } vfs_request_cmn_t; 64 65 typedef enum { 66 VFS_LOOKUP = VFS_LAST_CMN, 67 VFS_LAST_CLNT, /* keep this the last member of this enum */ 68 } vfs_request_clnt_t; 69 70 typedef enum { 71 VFS_REGISTER = VFS_LAST_CMN, 59 72 VFS_SEEK, 60 VFS_RENAME, 61 VFS_UNLINK, 62 VFS_LAST, /* keep this the last member of the enum */ 63 } vfs_request_t; 73 VFS_LAST_SRV, /* keep this the last member of this enum */ 74 } vfs_request_srv_t; 64 75 65 76 … … 88 99 89 100 /** Operations. */ 90 vfs_op_t ops[VFS_LAST - VFS_FIRST];101 vfs_op_t ops[VFS_LAST_CLNT - VFS_FIRST]; 91 102 } vfs_info_t; 92 103 -
uspace/srv/vfs/vfs_ops.c
r861e7d1 rcad9c72 746 746 * Check if the FS implements mandatory VFS operations. 747 747 */ 748 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] != VFS_OP_DEFINED) {749 dprintf("Operation VFS_REGISTER not defined by the client.\n");750 return false;751 }752 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] != VFS_OP_DEFINED) {753 dprintf("Operation VFS_MOUNT not defined by the client.\n");754 return false;755 }756 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] != VFS_OP_DEFINED) {757 dprintf("Operation VFS_UNMOUNT not defined by the client.\n");758 return false;759 }760 748 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] != VFS_OP_DEFINED) { 761 749 dprintf("Operation VFS_LOOKUP not defined by the client.\n"); … … 778 766 * Check if each operation is either not defined, defined or default. 779 767 */ 780 for (i = VFS_FIRST; i < VFS_LAST ; i++) {768 for (i = VFS_FIRST; i < VFS_LAST_CLNT; i++) { 781 769 if ((info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_NULL) && 782 770 (info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_DEFAULT) &&
Note:
See TracChangeset
for help on using the changeset viewer.