Changeset 8dc72b64 in mainline for uspace/srv/vfs/vfs.c
- Timestamp:
- 2009-03-02T17:37:19Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 16da5f8e
- Parents:
- 6519d6f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
r6519d6f r8dc72b64 29 29 /** @addtogroup fs 30 30 * @{ 31 */ 31 */ 32 32 33 33 /** 34 * @file 35 * @brief 34 * @file vfs.c 35 * @brief VFS service for HelenOS. 36 36 */ 37 37 … … 52 52 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall) 53 53 { 54 bool keep_on_going = 1;55 54 bool keep_on_going = true; 55 56 56 /* 57 57 * The connection was opened via the IPC_CONNECT_ME_TO call. … … 59 59 */ 60 60 ipc_answer_0(iid, EOK); 61 61 62 62 /* 63 63 * Here we enter the main connection fibril loop. … … 71 71 */ 72 72 while (keep_on_going) { 73 ipc_callid_t callid;74 73 ipc_call_t call; 74 ipc_callid_t callid = async_get_call(&call); 75 76 fs_handle_t fs_handle; 75 77 int phone; 76 fs_handle_t fs_handle; 77 78 callid = async_get_call(&call); 79 78 80 79 switch (IPC_GET_METHOD(call)) { 81 80 case IPC_M_PHONE_HUNGUP: … … 140 139 } 141 140 } 142 141 143 142 /* TODO: cleanup after the client */ 144 145 143 } 146 144 147 145 int main(int argc, char **argv) 148 146 { 149 ipcarg_t phonead;150 151 147 printf(NAME ": HelenOS VFS server\n"); 152 148 153 149 /* 154 150 * Initialize the list of registered file systems. 155 151 */ 156 152 list_initialize(&fs_head); 157 153 158 154 /* 159 155 * Initialize VFS node hash table. … … 163 159 return ENOMEM; 164 160 } 165 161 166 162 /* 167 163 * Allocate and initialize the Path Lookup Buffer. … … 173 169 return ENOMEM; 174 170 } 171 175 172 if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE | 176 173 AS_AREA_CACHEABLE) != plb) { … … 184 181 */ 185 182 async_set_client_connection(vfs_connection); 186 183 187 184 /* 188 185 * Register at the naming service. 189 186 */ 187 ipcarg_t phonead; 190 188 ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, &phonead); 191 189 192 190 /* 193 191 * Start accepting connections. … … 200 198 /** 201 199 * @} 202 */ 200 */
Note:
See TracChangeset
for help on using the changeset viewer.