Changeset a481d81 in mainline
- Timestamp:
- 2016-08-30T18:10:13Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dd5f703
- Parents:
- 101516d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
r101516d ra481d81 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> … … 53 56 static void vfs_pager(ipc_callid_t iid, ipc_call_t *icall, void *arg) 54 57 { 55 async_answer_0(iid, ENOTSUP); 58 async_answer_0(iid, EOK); 59 60 char *buf = memalign(PAGE_SIZE, 1); 61 const char hello[] = "Hello world!"; 62 63 memcpy(buf, hello, sizeof(hello)); 64 65 while (true) { 66 ipc_call_t call; 67 ipc_callid_t callid = async_get_call(&call); 68 69 if (!IPC_GET_IMETHOD(call)) 70 break; 71 72 switch (IPC_GET_IMETHOD(call)) { 73 case IPC_M_PAGE_IN: 74 if (buf) 75 async_answer_1(callid, EOK, (sysarg_t) buf); 76 else 77 async_answer_0(callid, ENOMEM); 78 break; 79 80 default: 81 async_answer_0(callid, ENOTSUP); 82 break; 83 } 84 } 56 85 } 57 86
Note:
See TracChangeset
for help on using the changeset viewer.