static int onlp_fan_hdr_get_locked__(onlp_oid_t oid, onlp_oid_hdr_t* hdr) { int rv = onlp_fani_hdr_get(oid, hdr); if(ONLP_SUCCESS(rv)) { return rv; } if(ONLP_UNSUPPORTED(rv)) { onlp_fan_info_t fi; rv = onlp_fani_info_get(oid, &fi); memcpy(hdr, &fi.hdr, sizeof(fi.hdr)); } return rv; }
static int onlp_thermal_status_get_locked__(onlp_oid_t id, uint32_t* status) { int rv = onlp_thermali_status_get(id, status); if(ONLP_SUCCESS(rv)) { return rv; } if(ONLP_UNSUPPORTED(rv)) { onlp_thermal_info_t ti; rv = onlp_thermali_info_get(id, &ti); *status = ti.status; } return rv; }
static int onlp_fan_status_get_locked__(onlp_oid_t oid, uint32_t* status) { int rv = onlp_fani_status_get(oid, status); if(ONLP_SUCCESS(rv)) { return rv; } if(ONLP_UNSUPPORTED(rv)) { onlp_fan_info_t fi; rv = onlp_fani_info_get(oid, &fi); *status = fi.status; } return rv; }
static int onlp_thermal_hdr_get_locked__(onlp_oid_t id, onlp_oid_hdr_t* hdr) { int rv = onlp_thermali_hdr_get(id, hdr); if(ONLP_SUCCESS(rv)) { return rv; } if(ONLP_UNSUPPORTED(rv)) { onlp_thermal_info_t ti; rv = onlp_thermali_info_get(id, &ti); memcpy(hdr, &ti.hdr, sizeof(ti.hdr)); } return rv; }