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