Build fix for IBM support.
[monky] / src / ibm.c
index 47b0d33..80aa3b8 100644 (file)
--- 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.