Changes in uspace/srv/bd/rd/rd.c [47b7006:d9fae235] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/rd/rd.c
r47b7006 rd9fae235 39 39 */ 40 40 41 #include <ipc/ipc.h> 41 42 #include <ipc/services.h> 42 43 #include <ipc/ns.h> … … 97 98 * Answer the first IPC_M_CONNECT_ME_TO call. 98 99 */ 99 async_answer_0(iid, EOK);100 ipc_answer_0(iid, EOK); 100 101 101 102 /* 102 103 * Now we wait for the client to send us its communication as_area. 103 104 */ 104 unsignedint flags;105 int flags; 105 106 if (async_share_out_receive(&callid, &comm_size, &flags)) { 106 107 fs_va = as_get_mappable_page(comm_size); … … 108 109 (void) async_share_out_finalize(callid, fs_va); 109 110 } else { 110 async_answer_0(callid, EHANGUP);111 ipc_answer_0(callid, EHANGUP); 111 112 return; 112 113 } … … 117 118 * Close the connection. 118 119 */ 119 async_answer_0(callid, EHANGUP);120 ipc_answer_0(callid, EHANGUP); 120 121 return; 121 122 } … … 123 124 while (true) { 124 125 callid = async_get_call(&call); 125 switch (IPC_GET_ IMETHOD(call)) {126 switch (IPC_GET_METHOD(call)) { 126 127 case IPC_M_PHONE_HUNGUP: 127 128 /* … … 129 130 * Answer the message and exit the fibril. 130 131 */ 131 async_answer_0(callid, EOK);132 ipc_answer_0(callid, EOK); 132 133 return; 133 134 case BD_READ_BLOCKS: … … 152 153 break; 153 154 case BD_GET_BLOCK_SIZE: 154 async_answer_1(callid, EOK, block_size);155 ipc_answer_1(callid, EOK, block_size); 155 156 continue; 156 157 case BD_GET_NUM_BLOCKS: 157 async_answer_2(callid, EOK, LOWER32(rd_size / block_size),158 ipc_answer_2(callid, EOK, LOWER32(rd_size / block_size), 158 159 UPPER32(rd_size / block_size)); 159 160 continue; … … 168 169 break; 169 170 } 170 async_answer_0(callid, retval);171 ipc_answer_0(callid, retval); 171 172 } 172 173 } … … 229 230 } 230 231 231 printf("%s: Found RAM disk at %p, %zu bytes\n", NAME, 232 (void *) rd_ph_addr, rd_size); 232 printf("%s: Found RAM disk at %p, %d bytes\n", NAME, rd_ph_addr, rd_size); 233 233 234 234 int rc = devmap_driver_register(NAME, rd_connection); … … 238 238 } 239 239 240 devmap_handle_t devmap_handle; 241 if (devmap_device_register("bd/initrd", &devmap_handle) != EOK) { 240 dev_handle_t dev_handle; 241 if (devmap_device_register("bd/initrd", &dev_handle) != EOK) { 242 devmap_hangup_phone(DEVMAP_DRIVER); 242 243 printf("%s: Unable to register device\n", NAME); 243 244 return false;
Note:
See TracChangeset
for help on using the changeset viewer.