Lines Matching refs:mechlist

28  * The core of the mechmanager is the "mechlist" data structure. It contains
36 * The mechlist is constructed on an as-needed basis, entries are not added
58 static mechlist_t *mechlist;
85 if (mechlist != NULL) {
89 /* The mechlist can dynamically grow, but let's preallocate space. */
90 mechlist = calloc(INITIAL_MECHLIST_SIZE, sizeof (mechlist_t));
91 if (mechlist == NULL)
112 if (mechlist == NULL)
117 free(mechlist[i].slots);
120 free(mechlist);
121 mechlist = NULL;
172 mechlist[i].type)) {
179 if (!mechlist[i].slots[j].initialized)
182 if (mechlist[i].slots[j].supported) {
192 list[num_found - 1] = mechlist[i].type;
247 if (!mechlist[index].slots[i].initialized ||
248 !mechlist[index].slots[i].supported)
252 info = mechlist[index].slots[i].mechanism_info;
260 = &mechlist[index].slots[i];
279 * Updates a mechanism in the mechlist. If the mechanism is not
305 * that the mechlist was updated. Search again, but use the last
317 if (force_refresh || !mechlist[index].slots[slot].initialized) {
336 * Updates a slot in the mechlist. Called by C_GetMechanismList
339 * of the mechlist.
460 mechlist[index].slots[slotnum].slotnum = slotnum;
474 mechlist[index].slots[slotnum].initialized = B_TRUE;
475 mechlist[index].slots[slotnum].supported = B_FALSE;
476 bzero(&mechlist[index].slots[slotnum].mechanism_info,
483 mechlist[index].slots[slotnum].initialized = B_TRUE;
484 mechlist[index].slots[slotnum].supported = B_TRUE;
485 mechlist[index].slots[slotnum].mechanism_info = info;
488 mechlist[index].slots[slotnum].initialized = B_TRUE;
489 mechlist[index].slots[slotnum].supported = B_FALSE;
490 bzero(&mechlist[index].slots[slotnum].mechanism_info,
503 * mechlist. If a mechanism is not present, an uninitialized entry is
555 * If the current storage for the mechlist is too
561 newmechlist = realloc(mechlist,
571 mechlist = newmechlist;
576 (void) memmove(&mechlist[index+1], &mechlist[index],
580 mechlist[index].type = new_mechs[i];
581 mechlist[index].slots = new_mechinfos;
595 * Performs a search of mechlist for the specified mechanism, and
603 * The caller is assumed to have a lock on the mechlist, preventing it
620 if (mechlist[i].type == mechanism) {
625 if (mechlist[i].type > mechanism)
677 if ((mechlist[index].slots[slotnum].initialized) &&
678 (mechlist[index].slots[slotnum].supported)) {
680 info = mechlist[index].slots[slotnum].mechanism_info;
687 *slot_info = &(mechlist[index].slots[slotnum]);