Changes in uspace/srv/vfs/vfs.c [6afc9d7:c1f7a315] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
r6afc9d7 rc1f7a315 37 37 38 38 #include <vfs/vfs.h> 39 #include <stdlib.h> 39 40 #include <ipc/services.h> 41 #include <abi/ipc/methods.h> 42 #include <libarch/config.h> 40 43 #include <ns.h> 41 44 #include <async.h> … … 51 54 #define NAME "vfs" 52 55 56 static void vfs_pager(ipc_callid_t iid, ipc_call_t *icall, void *arg) 57 { 58 async_answer_0(iid, EOK); 59 60 while (true) { 61 ipc_call_t call; 62 ipc_callid_t callid = async_get_call(&call); 63 64 if (!IPC_GET_IMETHOD(call)) 65 break; 66 67 switch (IPC_GET_IMETHOD(call)) { 68 case IPC_M_PAGE_IN: 69 vfs_page_in(callid, &call); 70 break; 71 default: 72 async_answer_0(callid, ENOTSUP); 73 break; 74 } 75 } 76 } 77 53 78 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 54 79 { … … 150 175 int main(int argc, char **argv) 151 176 { 177 int rc; 178 152 179 printf("%s: HelenOS VFS server\n", NAME); 153 180 … … 165 192 */ 166 193 plb = as_area_create(AS_AREA_ANY, PLB_SIZE, 167 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE );194 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, AS_AREA_UNPAGED); 168 195 if (plb == AS_MAP_FAILED) { 169 196 printf("%s: Cannot create address space area\n", NAME); … … 179 206 180 207 /* 208 * Create a port for the pager. 209 */ 210 port_id_t port; 211 rc = async_create_port(INTERFACE_PAGER, vfs_pager, NULL, &port); 212 if (rc != EOK) 213 return rc; 214 215 /* 181 216 * Set a connection handling function/fibril. 182 217 */ … … 192 227 * Register at the naming service. 193 228 */ 194 intrc = service_register(SERVICE_VFS);229 rc = service_register(SERVICE_VFS); 195 230 if (rc != EOK) { 196 231 printf("%s: Cannot register VFS service\n", NAME);
Note:
See TracChangeset
for help on using the changeset viewer.