Changes in uspace/lib/dispcfg/src/dispcfg.c [c0757e1f:b3eeae5] in mainline
- File:
-
- 1 edited
-
uspace/lib/dispcfg/src/dispcfg.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/dispcfg/src/dispcfg.c
rc0757e1f rb3eeae5 206 206 /** Free seat list. 207 207 * 208 * @param list Seatlist208 * @param list Display configuration list 209 209 */ 210 210 void dispcfg_free_seat_list(dispcfg_seat_list_t *list) … … 277 277 /** Free seat information. 278 278 * 279 * @param info Seatinformation279 * @param info Display configuration information 280 280 */ 281 281 void dispcfg_free_seat_info(dispcfg_seat_info_t *info) … … 378 378 async_exchange_end(exch); 379 379 return rc; 380 }381 382 /** Get list of devices assigned to a seat.383 *384 * @param dispcfg Display configuration385 * @param seat_id Seat ID386 * @param rlist Place to store pointer to new device list structure387 * @return EOK on success or an error code388 */389 errno_t dispcfg_get_asgn_dev_list(dispcfg_t *dispcfg, sysarg_t seat_id,390 dispcfg_dev_list_t **rlist)391 {392 async_exch_t *exch;393 aid_t req;394 ipc_call_t answer;395 dispcfg_dev_list_t *list;396 sysarg_t ndevs;397 sysarg_t *devs;398 errno_t rc;399 400 exch = async_exchange_begin(dispcfg->sess);401 req = async_send_1(exch, DISPCFG_GET_ASGN_DEV_LIST, seat_id, &answer);402 403 /* Receive device list length */404 rc = async_data_read_start(exch, &ndevs, sizeof (ndevs));405 if (rc != EOK) {406 async_exchange_end(exch);407 async_wait_for(req, &rc);408 return rc;409 }410 411 devs = calloc(ndevs, sizeof(sysarg_t));412 if (devs == NULL) {413 async_exchange_end(exch);414 async_forget(req);415 return ENOMEM;416 }417 418 /* Receive device list */419 rc = async_data_read_start(exch, devs, ndevs * sizeof (sysarg_t));420 async_exchange_end(exch);421 422 if (rc != EOK) {423 async_forget(req);424 return rc;425 }426 427 async_wait_for(req, &rc);428 if (rc != EOK)429 return rc;430 431 list = calloc(1, sizeof(dispcfg_dev_list_t));432 if (list == NULL)433 return ENOMEM;434 435 list->ndevs = ndevs;436 list->devs = devs;437 *rlist = list;438 return EOK;439 }440 441 /** Free device list.442 *443 * @param list Device list444 */445 void dispcfg_free_dev_list(dispcfg_dev_list_t *list)446 {447 free(list->devs);448 free(list);449 380 } 450 381
Note:
See TracChangeset
for help on using the changeset viewer.
