Lines Matching refs:avail

138 	int index, avail = -1;  in access_control_add()  local
142 if (avail < 0 && !inst[index].obj) { in access_control_add()
143 avail = index; in access_control_add()
147 if (avail < 0) { in access_control_add()
165 int ac_obj_inst_id = avail; in access_control_add()
173 ac_data[avail].obj_id = obj_id; in access_control_add()
174 ac_data[avail].obj_inst_id = obj_inst_id; in access_control_add()
175 ac_data[avail].ac_owner = ssid; in access_control_add()
381 int index, avail = -1, i = 0, j = 0; in ac_create() local
393 if (avail < 0 && !inst[index].obj) { in ac_create()
394 avail = index; in ac_create()
398 if (avail < 0) { in ac_create()
404 (void)memset(res[avail], 0, sizeof(res[avail][0]) * ARRAY_SIZE(res[avail])); in ac_create()
405 init_res_instance(res_inst[avail], ARRAY_SIZE(res_inst[avail])); in ac_create()
408 INIT_OBJ_RES_DATA(ACCESS_CONTROL_OBJECT_ID, res[avail], i, res_inst[avail], j, in ac_create()
409 &ac_data[avail].obj_id, sizeof(ac_data[avail].obj_id)); in ac_create()
410 INIT_OBJ_RES_DATA(ACCESS_CONTROL_OBJECT_INSTANCE_ID, res[avail], i, res_inst[avail], j, in ac_create()
411 &ac_data[avail].obj_inst_id, sizeof(ac_data[avail].obj_inst_id)); in ac_create()
412 INIT_OBJ_RES(ACCESS_CONTROL_ACL_ID, res[avail], i, res_inst[avail], j, MAX_SERVER_COUNT + 1, in ac_create()
413 true, false, ac_data[avail].acl, sizeof(ac_data[avail].acl[0]), NULL, NULL, in ac_create()
415 INIT_OBJ_RES_DATA(ACCESS_CONTROL_ACCESS_CONTROL_OWNER, res[avail], i, res_inst[avail], j, in ac_create()
416 &ac_data[avail].ac_owner, sizeof(ac_data[avail].ac_owner)); in ac_create()
418 inst[avail].resources = res[avail]; in ac_create()
419 inst[avail].resource_count = i; in ac_create()
422 return &inst[avail]; in ac_create()