Changeset cf2af94 in mainline for uspace/srv/bd/part/mbr_part/mbr_part.c
- Timestamp:
- 2011-02-09T11:46:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cb15135a
- Parents:
- a49c4002 (diff), 0b37882 (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/part/mbr_part/mbr_part.c
ra49c4002 rcf2af94 57 57 #include <stdlib.h> 58 58 #include <unistd.h> 59 #include <ipc/ipc.h>60 59 #include <ipc/bd.h> 61 60 #include <async.h> … … 242 241 rc = devmap_device_register(name, &dev); 243 242 if (rc != EOK) { 244 devmap_hangup_phone(DEVMAP_DRIVER);245 243 printf(NAME ": Unable to register device %s.\n", name); 246 244 return rc; … … 393 391 ipc_callid_t callid; 394 392 ipc_call_t call; 395 ipcarg_t method;393 sysarg_t method; 396 394 devmap_handle_t dh; 397 int flags;395 unsigned int flags; 398 396 int retval; 399 397 uint64_t ba; … … 414 412 415 413 if (part == NULL) { 416 ipc_answer_0(iid, EINVAL);414 async_answer_0(iid, EINVAL); 417 415 return; 418 416 } … … 421 419 422 420 /* Answer the IPC_M_CONNECT_ME_TO call. */ 423 ipc_answer_0(iid, EOK);421 async_answer_0(iid, EOK); 424 422 425 423 if (!async_share_out_receive(&callid, &comm_size, &flags)) { 426 ipc_answer_0(callid, EHANGUP);424 async_answer_0(callid, EHANGUP); 427 425 return; 428 426 } … … 430 428 fs_va = as_get_mappable_page(comm_size); 431 429 if (fs_va == NULL) { 432 ipc_answer_0(callid, EHANGUP);430 async_answer_0(callid, EHANGUP); 433 431 return; 434 432 } … … 438 436 while (1) { 439 437 callid = async_get_call(&call); 440 method = IPC_GET_ METHOD(call);438 method = IPC_GET_IMETHOD(call); 441 439 switch (method) { 442 440 case IPC_M_PHONE_HUNGUP: 443 441 /* The other side has hung up. */ 444 ipc_answer_0(callid, EOK);442 async_answer_0(callid, EOK); 445 443 return; 446 444 case BD_READ_BLOCKS: … … 465 463 break; 466 464 case BD_GET_BLOCK_SIZE: 467 ipc_answer_1(callid, EOK, block_size);465 async_answer_1(callid, EOK, block_size); 468 466 continue; 469 467 case BD_GET_NUM_BLOCKS: 470 ipc_answer_2(callid, EOK, LOWER32(part->length),468 async_answer_2(callid, EOK, LOWER32(part->length), 471 469 UPPER32(part->length)); 472 470 continue; … … 475 473 break; 476 474 } 477 ipc_answer_0(callid, retval);475 async_answer_0(callid, retval); 478 476 } 479 477 }
Note:
See TracChangeset
for help on using the changeset viewer.