Changes in uspace/srv/fs/fat/fat.c [9934f7d:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.c
r9934f7d rffa2c8ef 39 39 #include "fat.h" 40 40 #include <ipc/services.h> 41 #include < ns.h>41 #include <ipc/ns.h> 42 42 #include <async.h> 43 43 #include <errno.h> … … 76 76 * request has been completed. 77 77 */ 78 static void fat_connection(ipc_callid_t iid, ipc_call_t *icall , void *arg)78 static void fat_connection(ipc_callid_t iid, ipc_call_t *icall) 79 79 { 80 80 if (iid) { … … 88 88 89 89 dprintf(NAME ": connection opened\n"); 90 while (1) { 91 ipc_callid_t callid; 92 ipc_call_t call; 90 93 91 while (true) { 92 ipc_call_t call; 93 ipc_callid_t callid = async_get_call(&call); 94 95 if (!IPC_GET_IMETHOD(call)) 94 callid = async_get_call(&call); 95 switch (IPC_GET_IMETHOD(call)) { 96 case IPC_M_PHONE_HUNGUP: 96 97 return; 97 98 switch (IPC_GET_IMETHOD(call)) {99 98 case VFS_OUT_MOUNTED: 100 99 fat_mounted(callid, &call); … … 145 144 int main(int argc, char **argv) 146 145 { 146 int vfs_phone; 147 int rc; 148 147 149 printf(NAME ": HelenOS FAT file system server\n"); 148 149 intrc = fat_idx_init();150 151 rc = fat_idx_init(); 150 152 if (rc != EOK) 151 153 goto err; 152 153 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 154 SERVICE_VFS, 0, 0); 155 if (!vfs_sess) { 154 155 vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0); 156 if (vfs_phone < EOK) { 156 157 printf(NAME ": failed to connect to VFS\n"); 157 158 return -1; 158 159 } 159 160 160 rc = fs_register(vfs_ sess, &fat_reg, &fat_vfs_info, fat_connection);161 rc = fs_register(vfs_phone, &fat_reg, &fat_vfs_info, fat_connection); 161 162 if (rc != EOK) { 162 163 fat_idx_fini(); … … 167 168 task_retval(0); 168 169 async_manager(); 169 170 /* Not reached */ 170 /* not reached */ 171 171 return 0; 172 172 173 173 err: 174 174 printf(NAME ": Failed to register file system (%d)\n", rc); … … 178 178 /** 179 179 * @} 180 */ 180 */
Note:
See TracChangeset
for help on using the changeset viewer.