Changeset a78fa2a in mainline
- Timestamp:
- 2010-04-23T08:35:36Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- df747b9c
- Parents:
- 1f8657b
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libdrv/generic/driver.c
r1f8657b ra78fa2a 111 111 device_t *dev = driver_create_device(); 112 112 dev->handle = dev_handle; 113 async_string_receive(&dev->name, 0, NULL); 113 114 add_to_devices_list(dev); 114 115 if (driver->driver_ops->add_device(dev)) { … … 121 122 ret = 0; 122 123 } 123 ipc_answer_ 1(iid, EOK, ret);124 ipc_answer_0(iid, EOK); 124 125 } 125 126 -
uspace/srv/devman/devman.c
r1f8657b ra78fa2a 503 503 { 504 504 printf(NAME ": add_device\n"); 505 506 ipcarg_t ret; 507 ipcarg_t rc = async_req_1_1(phone, DRIVER_ADD_DEVICE, node->handle, &ret); 508 if (rc != EOK) { 505 506 ipcarg_t rc; 507 ipc_call_t answer; 508 509 // send the device to the driver 510 aid_t req = async_send_1(phone, DRIVER_ADD_DEVICE, node->handle, &answer); 511 512 // send the device's name to the driver 513 rc = async_data_write_start(phone, node->name, str_size(node->name) + 1); 514 if (rc != EOK) { 509 515 // TODO handle error 510 return; 511 } 512 513 // TODO inspect return value (ret) to find out whether the device was successfully probed and added 516 } 517 518 // wait for answer from the driver 519 async_wait_for(req, &rc); 520 switch(rc) { 521 // TODO inspect return value to find out whether the device was successfully probed and added 522 case EOK: 523 case ENOENT: 524 525 break; 526 527 } 514 528 515 529 return;
Note:
See TracChangeset
for help on using the changeset viewer.