Changeset ad7a6c9 in mainline for uspace/srv/bd/file_bd/file_bd.c
- Timestamp:
- 2011-03-30T13:10:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ae90f9
- Parents:
- 6e50466 (diff), d6b81941 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/file_bd/file_bd.c
r6e50466 rad7a6c9 41 41 #include <stdio.h> 42 42 #include <unistd.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/bd.h> 45 44 #include <async.h> … … 120 119 rc = devmap_device_register(device_name, &devmap_handle); 121 120 if (rc != EOK) { 122 devmap_hangup_phone(DEVMAP_DRIVER);123 121 printf(NAME ": Unable to register device '%s'.\n", 124 122 device_name); … … 179 177 sysarg_t method; 180 178 size_t comm_size; 181 int flags;179 unsigned int flags; 182 180 int retval; 183 181 uint64_t ba; … … 185 183 186 184 /* Answer the IPC_M_CONNECT_ME_TO call. */ 187 ipc_answer_0(iid, EOK);185 async_answer_0(iid, EOK); 188 186 189 187 if (!async_share_out_receive(&callid, &comm_size, &flags)) { 190 ipc_answer_0(callid, EHANGUP);188 async_answer_0(callid, EHANGUP); 191 189 return; 192 190 } … … 194 192 fs_va = as_get_mappable_page(comm_size); 195 193 if (fs_va == NULL) { 196 ipc_answer_0(callid, EHANGUP);194 async_answer_0(callid, EHANGUP); 197 195 return; 198 196 } … … 206 204 case IPC_M_PHONE_HUNGUP: 207 205 /* The other side has hung up. */ 208 ipc_answer_0(callid, EOK);206 async_answer_0(callid, EOK); 209 207 return; 210 208 case BD_READ_BLOCKS: … … 229 227 break; 230 228 case BD_GET_BLOCK_SIZE: 231 ipc_answer_1(callid, EOK, block_size);229 async_answer_1(callid, EOK, block_size); 232 230 continue; 233 231 case BD_GET_NUM_BLOCKS: 234 ipc_answer_2(callid, EOK, LOWER32(num_blocks),232 async_answer_2(callid, EOK, LOWER32(num_blocks), 235 233 UPPER32(num_blocks)); 236 234 continue; … … 239 237 break; 240 238 } 241 ipc_answer_0(callid, retval);239 async_answer_0(callid, retval); 242 240 } 243 241 }
Note:
See TracChangeset
for help on using the changeset viewer.