Changeset fc8c2b6 in mainline for uspace/srv/devman/main.c
- Timestamp:
- 2011-03-30T14:26:13Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e72fb34
- Parents:
- 3fddb55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/main.c
r3fddb55 rfc8c2b6 448 448 } 449 449 450 /** Find handle for the device instance identified by device class name. */ 451 static void devman_function_get_handle_by_class(ipc_callid_t iid, 452 ipc_call_t *icall) 453 { 454 char *classname; 455 char *devname; 456 457 int rc = async_data_write_accept((void **) &classname, true, 0, 0, 0, 0); 458 if (rc != EOK) { 459 async_answer_0(iid, rc); 460 return; 461 } 462 rc = async_data_write_accept((void **) &devname, true, 0, 0, 0, 0); 463 if (rc != EOK) { 464 free(classname); 465 async_answer_0(iid, rc); 466 return; 467 } 468 469 470 fun_node_t *fun = find_fun_node_by_class(&class_list, 471 classname, devname); 472 473 free(classname); 474 free(devname); 475 476 if (fun == NULL) { 477 async_answer_0(iid, ENOENT); 478 return; 479 } 480 481 async_answer_1(iid, EOK, fun->handle); 482 } 483 450 484 451 485 /** Function for handling connections from a client to the device manager. */ … … 466 500 case DEVMAN_DEVICE_GET_HANDLE: 467 501 devman_function_get_handle(callid, &call); 502 break; 503 case DEVMAN_DEVICE_GET_HANDLE_BY_CLASS: 504 devman_function_get_handle_by_class(callid, &call); 468 505 break; 469 506 default:
Note:
See TracChangeset
for help on using the changeset viewer.