Changes in uspace/srv/fs/fat/fat.c [852b801:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.c
r852b801 rffa2c8ef 38 38 39 39 #include "fat.h" 40 #include <ipc/ipc.h>41 40 #include <ipc/services.h> 41 #include <ipc/ns.h> 42 42 #include <async.h> 43 43 #include <errno.h> 44 44 #include <unistd.h> 45 #include <task.h> 45 46 #include <stdio.h> 46 47 #include <libfs.h> 47 48 #include "../../vfs/vfs.h" 48 49 50 #define NAME "fat" 49 51 50 52 vfs_info_t fat_vfs_info = { 51 .name = "fat", 53 .name = NAME, 54 .concurrent_read_write = false, 55 .write_retains_size = false, 52 56 }; 53 57 … … 80 84 * created by IPC_M_CONNECT_TO_ME. 81 85 */ 82 ipc_answer_0(iid, EOK);86 async_answer_0(iid, EOK); 83 87 } 84 88 85 dprintf( "VFS-FAT connection established.\n");89 dprintf(NAME ": connection opened\n"); 86 90 while (1) { 87 91 ipc_callid_t callid; … … 89 93 90 94 callid = async_get_call(&call); 91 switch (IPC_GET_ METHOD(call)) {95 switch (IPC_GET_IMETHOD(call)) { 92 96 case IPC_M_PHONE_HUNGUP: 93 97 return; … … 97 101 case VFS_OUT_MOUNT: 98 102 fat_mount(callid, &call); 103 break; 104 case VFS_OUT_UNMOUNTED: 105 fat_unmounted(callid, &call); 106 break; 107 case VFS_OUT_UNMOUNT: 108 fat_unmount(callid, &call); 99 109 break; 100 110 case VFS_OUT_LOOKUP: … … 126 136 break; 127 137 default: 128 ipc_answer_0(callid, ENOTSUP);138 async_answer_0(callid, ENOTSUP); 129 139 break; 130 140 } … … 137 147 int rc; 138 148 139 printf( "fat: HelenOS FAT file system server.\n");149 printf(NAME ": HelenOS FAT file system server\n"); 140 150 141 151 rc = fat_idx_init(); … … 143 153 goto err; 144 154 145 vfs_phone = ipc_connect_me_to_blocking(PHONE_NS,SERVICE_VFS, 0, 0);155 vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0); 146 156 if (vfs_phone < EOK) { 147 printf( "fat: failed to connect to VFS\n");157 printf(NAME ": failed to connect to VFS\n"); 148 158 return -1; 149 159 } … … 155 165 } 156 166 157 dprintf("FAT filesystem registered, fs_handle=%d.\n", 158 fat_reg.fs_handle); 159 167 printf(NAME ": Accepting connections\n"); 168 task_retval(0); 160 169 async_manager(); 161 170 /* not reached */ … … 163 172 164 173 err: 165 printf( "Failed to register the FATfile system (%d)\n", rc);174 printf(NAME ": Failed to register file system (%d)\n", rc); 166 175 return rc; 167 176 }
Note:
See TracChangeset
for help on using the changeset viewer.