int apm_init(void) { struct olsr_apm_info ApmInfo; OLSR_PRINTF(3, "Initializing APM\n"); if (apm_read(&ApmInfo) < 0) return -1; apm_printinfo(&ApmInfo); return 0; }
int apm_init(void) { struct olsr_apm_info ainfo; method = -1; OLSR_PRINTF(3, "Initializing APM\n"); if ((((fd_index = acpi_probe()) >= 0) || ac_power_on) && apm_read_acpi(&ainfo)) method = USE_ACPI; else if (apm_read_apm(&ainfo)) method = USE_APM; if (method != -1) apm_printinfo(&ainfo); return method; }