Lines Matching refs:section

99 static int	get_sensor_by_name(const rmclomv_cache_section_t *section,
101 static int validate_section_entry(rmclomv_cache_section_t *section,
103 static int add_names_to_section(rmclomv_cache_section_t *section);
104 static void free_section(rmclomv_cache_section_t *section);
106 rmclomv_cache_section_t *section);
616 free_section(rmclomv_cache_section_t *section) in free_section() argument
618 size_t len = section->section_len; in free_section()
619 kmem_free(section, len); in free_section()
627 add_section(rmclomv_cache_section_t **head, rmclomv_cache_section_t *section) in add_section() argument
629 section->next_section = *head; in add_section()
630 *head = section; in add_section()
719 get_sensor_by_name(const rmclomv_cache_section_t *section, in get_sensor_by_name() argument
724 for (i = 0; i < section->num_entries; i++) { in get_sensor_by_name()
725 if (strcmp(name, section->entry[i].handle_name.name) == 0) { in get_sensor_by_name()
1301 validate_section_entry(rmclomv_cache_section_t *section, int index) in validate_section_entry() argument
1306 for (i = index; i < section->num_entries; i++) { in validate_section_entry()
1307 entry = &section->entry[i]; in validate_section_entry()
1311 entry->handle, section->sensor_type); in validate_section_entry()
1317 entry->handle_name.name, section->sensor_type); in validate_section_entry()
1320 } else if (section->entry[index].handle == entry->handle) { in validate_section_entry()
1323 entry->handle, section->sensor_type); in validate_section_entry()
1325 section->entry[index].handle_name.name) == 0) { in validate_section_entry()
1329 entry->handle, section->sensor_type); in validate_section_entry()
1336 section->num_entries--; in validate_section_entry()
1338 for (i = index; i < section->num_entries; i++) { in validate_section_entry()
1339 section->entry[i] = section->entry[i + 1]; in validate_section_entry()
1358 add_names_to_section(rmclomv_cache_section_t *section) in add_names_to_section() argument
1366 for (index = 0; index < section->num_entries; index++) { in add_names_to_section()
1367 entry = &section->entry[index]; in add_names_to_section()
1382 for (index = 0; index < section->num_entries; index++) { in add_names_to_section()
1383 while (validate_section_entry(section, index) == B_FALSE) in add_names_to_section()
1389 section->num_entries, section->sensor_type); in add_names_to_section()
1616 rmclomv_cache_section_t *section; in refresh_name_cache() local
1667 section = create_cache_section(RMCLOMV_VOLT_SENS, in refresh_name_cache()
1670 section->entry[index].handle = in refresh_name_cache()
1673 add_section(&my_chain, section); in refresh_name_cache()
1682 section = create_cache_section(RMCLOMV_TEMP_SENS, in refresh_name_cache()
1685 section->entry[index].handle = in refresh_name_cache()
1688 add_section(&my_chain, section); in refresh_name_cache()
1696 section = create_cache_section(RMCLOMV_FAN_SENS, in refresh_name_cache()
1699 section->entry[index].handle = in refresh_name_cache()
1702 add_section(&my_chain, section); in refresh_name_cache()
1711 section = create_cache_section(RMCLOMV_AMP_IND, in refresh_name_cache()
1714 section->entry[index].handle = in refresh_name_cache()
1717 add_section(&my_chain, section); in refresh_name_cache()
1725 section = create_cache_section(RMCLOMV_LED_IND, in refresh_name_cache()
1728 section->entry[index].handle = in refresh_name_cache()
1731 add_section(&my_chain, section); in refresh_name_cache()
1744 section = create_cache_section(RMCLOMV_ALARM_IND, in refresh_name_cache()
1747 section->entry[index].handle = in refresh_name_cache()
1750 add_section(&my_chain, section); in refresh_name_cache()
1776 for (section = my_chain; in refresh_name_cache()
1777 section != NULL; in refresh_name_cache()
1778 section = section->next_section) { in refresh_name_cache()
1779 retval = add_names_to_section(section); in refresh_name_cache()
1833 rmclomv_cache_section_t *section; in do_psu_cmd() local
1844 section = rmclomv_find_section(rmclomv_subcache, detector_type); in do_psu_cmd()
1847 if ((section == NULL) || (section->num_entries == 0)) in do_psu_cmd()
1850 env_ind->next_id = section->entry[0].handle_name; in do_psu_cmd()
1855 if ((section == NULL) || (get_sensor_by_name(section, in do_psu_cmd()
1859 } else if (index + 1 < section->num_entries) in do_psu_cmd()
1861 section->entry[index + 1].handle_name; in do_psu_cmd()
1870 rmc_psu->handle = section->entry[index].handle; in do_psu_cmd()
1871 indicator_mask = section->entry[index].ind_mask; in do_psu_cmd()
1986 rmclomv_cache_section_t *section; in rmclomv_ioctl() local
2050 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2056 if (section->num_entries == 0) in rmclomv_ioctl()
2060 section->entry[0].handle_name; in rmclomv_ioctl()
2065 if (get_sensor_by_name(section, env_sensor.id.name, in rmclomv_ioctl()
2069 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2071 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2080 rmc_volts.handle = section->entry[index].handle; in rmclomv_ioctl()
2161 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2167 if (section->num_entries == 0) in rmclomv_ioctl()
2171 section->entry[0].handle_name; in rmclomv_ioctl()
2176 if (get_sensor_by_name(section, env_sensor.id.name, in rmclomv_ioctl()
2180 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2182 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2191 rmc_temp.handle = section->entry[index].handle; in rmclomv_ioctl()
2248 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2254 if (section->num_entries == 0) in rmclomv_ioctl()
2258 section->entry[0].handle_name; in rmclomv_ioctl()
2263 if (get_sensor_by_name(section, env_fan.id.name, in rmclomv_ioctl()
2267 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2269 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2278 rmc_fan.handle = section->entry[index].handle; in rmclomv_ioctl()
2340 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2347 if (section->num_entries == 0) { in rmclomv_ioctl()
2352 env_ind.next_id = section->entry[0].handle_name; in rmclomv_ioctl()
2357 if (get_sensor_by_name(section, env_ind.id.name, in rmclomv_ioctl()
2363 if (index + 1 < section->num_entries) { in rmclomv_ioctl()
2365 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2383 rmc_ampi.handle = section->entry[index].handle; in rmclomv_ioctl()
2433 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2446 if (section->num_entries == 0) in rmclomv_ioctl()
2450 section->entry[0].handle_name; in rmclomv_ioctl()
2455 if (get_sensor_by_name(section, env_hpu.id.name, in rmclomv_ioctl()
2459 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2461 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2470 rmc_fru.handle = section->entry[index].handle; in rmclomv_ioctl()
2471 special = section->entry[index].ind_mask; in rmclomv_ioctl()
2554 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2560 if (section->num_entries == 0) in rmclomv_ioctl()
2564 section->entry[0].handle_name; in rmclomv_ioctl()
2569 if (get_sensor_by_name(section, env_ledinfo.id.name, in rmclomv_ioctl()
2573 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2575 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2584 rmc_led.handle = section->entry[index].handle; in rmclomv_ioctl()
2671 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2673 (get_sensor_by_name(section, env_ledctl.id.name, in rmclomv_ioctl()
2681 rmc_setled.handle = section->entry[index].handle; in rmclomv_ioctl()
2760 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2766 if (section->num_entries == 0) in rmclomv_ioctl()
2770 section->entry[0].handle_name; in rmclomv_ioctl()
2775 if (get_sensor_by_name(section, env_alarminfo.id.name, in rmclomv_ioctl()
2779 } else if (index + 1 < section->num_entries) in rmclomv_ioctl()
2781 section->entry[index + 1].handle_name; in rmclomv_ioctl()
2790 rmc_alarm.handle = section->entry[index].handle; in rmclomv_ioctl()
2865 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_ioctl()
2867 (get_sensor_by_name(section, env_alarmctl.id.name, in rmclomv_ioctl()
2875 rmc_setalarm.handle = section->entry[index].handle; in rmclomv_ioctl()
3447 rmclomv_cache_section_t *section; in rmclomv_alarm_get() local
3458 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_alarm_get()
3468 if (index >= section->num_entries) in rmclomv_alarm_get()
3471 u_rmc_alarm.handle = section->entry[index].handle; in rmclomv_alarm_get()
3513 rmclomv_cache_section_t *section; in rmclomv_alarm_set() local
3524 ((section = rmclomv_find_section(rmclomv_cache, in rmclomv_alarm_set()
3534 if (index >= section->num_entries) in rmclomv_alarm_set()
3537 u_rmc_setalarm.handle = section->entry[index].handle; in rmclomv_alarm_set()