Changeset c952465d in mainline
- Timestamp:
- 2007-09-13T19:28:50Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3f598e
- Parents:
- 7a9364c
- Location:
- uspace
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/ipc/services.h
r7a9364c rc952465d 44 44 #define SERVICE_RD 5 45 45 #define SERVICE_FS 6 46 #define SERVICE_VFS 7 46 47 47 48 /* Memory area to be received from NS */ -
uspace/srv/vfs/vfs.c
r7a9364c rc952465d 36 36 */ 37 37 38 #include <ipc/ipc.h> 39 #include <ipc/services.h> 40 #include <async.h> 41 #include <errno.h> 42 #include "vfs.h" 43 44 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall) 45 { 46 ipcarg_t iarg1, iarg2; 47 48 /* 49 * The connection was opened via the IPC_CONNECT_ME_TO call. 50 * This call needs to be answered. 51 * 52 * The protocol is that the requested action is specified in ARG1 53 * of the opening call. If the request has a single integer argument, 54 * it is passed in ARG2. 55 */ 56 iarg1 = IPC_GET_ARG1(*icall); 57 iarg2 = IPC_GET_ARG2(*icall); 58 59 /* 60 * Now, the connection can either be from an individual FS, 61 * which is trying to register itself and pass us its capabilities. 62 * Or, the connection is a regular connection from a client that wants 63 * us to do something for it (e.g. open a file, mount a fs etc.). 64 */ 65 switch (iarg1) { 66 case VFS_REGISTER: 67 case VFS_MOUNT: 68 case VFS_UNMOUNT: 69 case VFS_OPEN: 70 default: 71 ipc_answer_fast(iid, ENOTSUP, 0, 0); 72 break; 73 } 74 } 75 38 76 int main(int argc, char **argv) 39 77 { 78 ipcarg_t phonead; 79 80 async_set_client_connection(vfs_connection); 81 ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, &phonead); 82 async_manager(); 40 83 return 0; 41 84 }
Note:
See TracChangeset
for help on using the changeset viewer.