X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fibm.c;h=80aa3b859f7e3029f8125ca4d5be092c6beb24f2;hb=refs%2Fheads%2Fmaster;hp=47b0d3301b99d38b085d651b2e87477dfd55f922;hpb=f1b69e26a29bf8a5c3f91980dc4f15327d9e1b2a;p=monky diff --git a/src/ibm.c b/src/ibm.c index 47b0d33..80aa3b8 100644 --- a/src/ibm.c +++ b/src/ibm.c @@ -73,7 +73,7 @@ speed: 2944 commands: enable, disable * Peter Tarjan (ptarjan@citromail.hu) */ -void get_ibm_acpi_fan(struct text_object *obj, char *p, int p_max_size) +int get_ibm_acpi_fan(struct text_object *obj, char *p, int p_max_size) { FILE *fp; unsigned int speed = 0; @@ -82,7 +82,7 @@ void get_ibm_acpi_fan(struct text_object *obj, char *p, int p_max_size) (void)obj; if (!p || p_max_size <= 0) { - return; + return 0; } snprintf(fan, 127, "%s/fan", IBM_ACPI_DIR); @@ -106,6 +106,7 @@ void get_ibm_acpi_fan(struct text_object *obj, char *p, int p_max_size) fclose(fp); snprintf(p, p_max_size, "%d", speed); + return 0; } /* get the measured temperatures from the temperature sensors @@ -129,7 +130,7 @@ void get_ibm_acpi_fan(struct text_object *obj, char *p, int p_max_size) temperatures: 41 43 31 46 33 -128 29 -128 * Peter Tarjan (ptarjan@citromail.hu) */ -void get_ibm_acpi_temps(void) +int get_ibm_acpi_temps(void) { FILE *fp; @@ -158,6 +159,7 @@ void get_ibm_acpi_temps(void) } fclose(fp); + return 0; } /* get volume (0-14) on IBM/Lenovo laptops running the ibm acpi.