Changes in uspace/srv/fs/tmpfs/tmpfs.c [79ae36dd:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs.c
r79ae36dd rffa2c8ef 30 30 /** @addtogroup fs 31 31 * @{ 32 */ 32 */ 33 33 34 34 /** … … 43 43 #include "tmpfs.h" 44 44 #include <ipc/services.h> 45 #include < ns.h>45 #include <ipc/ns.h> 46 46 #include <async.h> 47 47 #include <errno.h> … … 94 94 95 95 dprintf(NAME ": connection opened\n"); 96 while (1) { 97 ipc_callid_t callid; 98 ipc_call_t call; 96 99 97 while (true) { 98 ipc_call_t call; 99 ipc_callid_t callid = async_get_call(&call); 100 101 if (!IPC_GET_IMETHOD(call)) 100 callid = async_get_call(&call); 101 switch (IPC_GET_IMETHOD(call)) { 102 case IPC_M_PHONE_HUNGUP: 102 103 return; 103 104 switch (IPC_GET_IMETHOD(call)) {105 104 case VFS_OUT_MOUNTED: 106 105 tmpfs_mounted(callid, &call); … … 152 151 { 153 152 printf(NAME ": HelenOS TMPFS file system server\n"); 154 153 155 154 if (!tmpfs_init()) { 156 155 printf(NAME ": failed to initialize TMPFS\n"); 157 156 return -1; 158 157 } 159 160 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 161 SERVICE_VFS, 0, 0); 162 if (!vfs_sess) { 158 159 int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0); 160 if (vfs_phone < EOK) { 163 161 printf(NAME ": Unable to connect to VFS\n"); 164 162 return -1; 165 163 } 166 167 int rc = fs_register(vfs_ sess, &tmpfs_reg, &tmpfs_vfs_info,164 165 int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info, 168 166 tmpfs_connection); 169 167 if (rc != EOK) { … … 171 169 return rc; 172 170 } 173 171 174 172 printf(NAME ": Accepting connections\n"); 175 173 task_retval(0); 176 174 async_manager(); 177 178 /* Not reached */ 175 /* not reached */ 179 176 return 0; 180 177 } … … 182 179 /** 183 180 * @} 184 */ 181 */
Note:
See TracChangeset
for help on using the changeset viewer.