Changes in uspace/srv/vfs/vfs.c [c1f7a315:6afc9d7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
rc1f7a315 r6afc9d7 37 37 38 38 #include <vfs/vfs.h> 39 #include <stdlib.h>40 39 #include <ipc/services.h> 41 #include <abi/ipc/methods.h>42 #include <libarch/config.h>43 40 #include <ns.h> 44 41 #include <async.h> … … 54 51 #define NAME "vfs" 55 52 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 78 53 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 79 54 { … … 175 150 int main(int argc, char **argv) 176 151 { 177 int rc;178 179 152 printf("%s: HelenOS VFS server\n", NAME); 180 153 … … 192 165 */ 193 166 plb = as_area_create(AS_AREA_ANY, PLB_SIZE, 194 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE , AS_AREA_UNPAGED);167 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 195 168 if (plb == AS_MAP_FAILED) { 196 169 printf("%s: Cannot create address space area\n", NAME); … … 206 179 207 180 /* 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 /*216 181 * Set a connection handling function/fibril. 217 182 */ … … 227 192 * Register at the naming service. 228 193 */ 229 rc = service_register(SERVICE_VFS);194 int rc = service_register(SERVICE_VFS); 230 195 if (rc != EOK) { 231 196 printf("%s: Cannot register VFS service\n", NAME);
Note:
See TracChangeset
for help on using the changeset viewer.