Changeset f65d9cc in mainline for uspace/srv/net/inetsrv/inet_link.c
- Timestamp:
- 2013-09-21T05:28:00Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 026271d5
- Parents:
- 772a172 (diff), b9f7848b (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/net/inetsrv/inet_link.c
r772a172 rf65d9cc 493 493 } 494 494 495 /** Get IDs of all links. */ 496 int inet_link_get_id_list(sysarg_t **rid_list, size_t *rcount) 497 { 498 sysarg_t *id_list; 499 size_t count, i; 500 501 fibril_mutex_lock(&inet_discovery_lock); 502 count = list_count(&inet_link_list); 503 504 id_list = calloc(count, sizeof(sysarg_t)); 505 if (id_list == NULL) { 506 fibril_mutex_unlock(&inet_discovery_lock); 507 return ENOMEM; 508 } 509 510 i = 0; 511 list_foreach(inet_link_list, link_list, inet_link_t, ilink) { 512 id_list[i++] = ilink->svc_id; 513 log_msg(LOG_DEFAULT, LVL_NOTE, "add link to list"); 514 } 515 516 fibril_mutex_unlock(&inet_discovery_lock); 517 518 log_msg(LOG_DEFAULT, LVL_NOTE, "return %zu links", count); 519 *rid_list = id_list; 520 *rcount = count; 521 522 return EOK; 523 } 524 495 525 /** @} 496 526 */
Note:
See TracChangeset
for help on using the changeset viewer.