Changeset cf2af94 in mainline for uspace/srv/bd/part/guid_part/guid_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/guid_part/guid_part.c
ra49c4002 rcf2af94 47 47 #include <stdlib.h> 48 48 #include <unistd.h> 49 #include <ipc/ipc.h>50 49 #include <ipc/bd.h> 51 50 #include <async.h> … … 191 190 rc = devmap_device_register(name, &dev); 192 191 if (rc != EOK) { 193 devmap_hangup_phone(DEVMAP_DRIVER);194 192 printf(NAME ": Unable to register device %s.\n", name); 195 193 return rc; … … 315 313 ipc_callid_t callid; 316 314 ipc_call_t call; 317 ipcarg_t method;315 sysarg_t method; 318 316 devmap_handle_t dh; 319 int flags;317 unsigned int flags; 320 318 int retval; 321 319 aoff64_t ba; … … 336 334 337 335 if (part == NULL) { 338 ipc_answer_0(iid, EINVAL);336 async_answer_0(iid, EINVAL); 339 337 return; 340 338 } … … 343 341 344 342 /* Answer the IPC_M_CONNECT_ME_TO call. */ 345 ipc_answer_0(iid, EOK);343 async_answer_0(iid, EOK); 346 344 347 345 if (!async_share_out_receive(&callid, &comm_size, &flags)) { 348 ipc_answer_0(callid, EHANGUP);346 async_answer_0(callid, EHANGUP); 349 347 return; 350 348 } … … 352 350 fs_va = as_get_mappable_page(comm_size); 353 351 if (fs_va == NULL) { 354 ipc_answer_0(callid, EHANGUP);352 async_answer_0(callid, EHANGUP); 355 353 return; 356 354 } … … 360 358 while (1) { 361 359 callid = async_get_call(&call); 362 method = IPC_GET_ METHOD(call);360 method = IPC_GET_IMETHOD(call); 363 361 switch (method) { 364 362 case IPC_M_PHONE_HUNGUP: 365 363 /* The other side has hung up. */ 366 ipc_answer_0(callid, EOK);364 async_answer_0(callid, EOK); 367 365 return; 368 366 case BD_READ_BLOCKS: … … 387 385 break; 388 386 case BD_GET_BLOCK_SIZE: 389 ipc_answer_1(callid, EOK, block_size);387 async_answer_1(callid, EOK, block_size); 390 388 continue; 391 389 case BD_GET_NUM_BLOCKS: 392 ipc_answer_2(callid, EOK, LOWER32(part->length),390 async_answer_2(callid, EOK, LOWER32(part->length), 393 391 UPPER32(part->length)); 394 392 continue; … … 397 395 break; 398 396 } 399 ipc_answer_0(callid, retval);397 async_answer_0(callid, retval); 400 398 } 401 399 }
Note:
See TracChangeset
for help on using the changeset viewer.