Changes in uspace/srv/fs/ext2fs/ext2fs.c [9934f7d:5bd1ffb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext2fs/ext2fs.c
r9934f7d r5bd1ffb 40 40 #include "ext2fs.h" 41 41 #include <ipc/services.h> 42 #include < ns.h>42 #include <ipc/ns.h> 43 43 #include <async.h> 44 44 #include <errno.h> … … 75 75 * request has been completed. 76 76 */ 77 static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall , void *arg)77 static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall) 78 78 { 79 79 if (iid) { … … 87 87 88 88 dprintf(NAME ": connection opened\n"); 89 while (true) { 89 while (1) { 90 ipc_callid_t callid; 90 91 ipc_call_t call; 91 ipc_callid_t callid = async_get_call(&call); 92 93 if (!IPC_GET_IMETHOD(call)) 92 93 callid = async_get_call(&call); 94 switch (IPC_GET_IMETHOD(call)) { 95 case IPC_M_PHONE_HUNGUP: 94 96 return; 95 96 switch (IPC_GET_IMETHOD(call)) {97 97 case VFS_OUT_MOUNTED: 98 98 ext2fs_mounted(callid, &call); … … 143 143 int main(int argc, char **argv) 144 144 { 145 int vfs_phone; 146 int rc; 147 145 148 printf(NAME ": HelenOS EXT2 file system server\n"); 146 147 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 148 SERVICE_VFS, 0, 0); 149 if (!vfs_sess) { 149 150 vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0); 151 if (vfs_phone < EOK) { 150 152 printf(NAME ": failed to connect to VFS\n"); 151 153 return -1; 152 154 } 153 155 154 intrc = ext2fs_global_init();156 rc = ext2fs_global_init(); 155 157 if (rc != EOK) { 156 158 printf(NAME ": Failed global initialization\n"); … … 158 160 } 159 161 160 rc = fs_register(vfs_ sess, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);162 rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection); 161 163 if (rc != EOK) { 162 164 fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
Note:
See TracChangeset
for help on using the changeset viewer.