Changeset 26f2af0 in mainline for uspace/srv/fs/fat/fat.c
- Timestamp:
- 2007-09-18T19:58:19Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 47a776f9
- Parents:
- c3b25510
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.c
rc3b25510 r26f2af0 39 39 #include <ipc/ipc.h> 40 40 #include <ipc/services.h> 41 #include <async.h> 41 42 #include <errno.h> 42 43 #include <unistd.h> … … 59 60 }; 60 61 62 /* 63 * This fibril processes request from the VFS server. 64 */ 65 void fat_connection(ipc_callid_t iid, ipc_call_t *icall) 66 { 67 while (1) { 68 ipc_callid_t callid; 69 ipc_call_t call; 70 71 callid = async_get_call(&call); 72 ipc_answer_fast(callid, ENOTSUP, 0, 0); 73 } 74 } 75 61 76 int main(int argc, char **argv) 62 77 { … … 69 84 } 70 85 71 /* TODO: start making calls according to the VFS protocol */ 86 /* 87 * Tell VFS that we are here and want to get registered. 88 * We use the async framework because VFS will answer the request 89 * out-of-order, when it knows that the operation succeeded or failed. 90 */ 91 ipc_call_t answer; 92 aid_t req = async_send_2(vfs_phone, VFS_REGISTER, 0, 0, &answer); 72 93 94 /* 95 * Send our VFS info structure to VFS. 96 */ 97 int rc = ipc_data_send(vfs_phone, &fat_vfs_info, sizeof(fat_vfs_info)); 98 if (rc != EOK) { 99 async_wait_for(req, NULL); 100 return rc; 101 } 102 103 /* 104 * Ask VFS for callback connection. 105 */ 106 ipcarg_t phonehash; 107 ipc_connect_to_me(vfs_phone, 0, 0, &phonehash); 108 109 async_new_connection(phonehash, 0, NULL, fat_connection); 73 110 return 0; 74 111 }
Note:
See TracChangeset
for help on using the changeset viewer.