X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbattery.c;h=272193ee507b742d78ac30de98cfe7466b697f45;hb=351026b0595385ca5376211c1af965bf2d4731b9;hp=9f1bee654e014812f254070a458f2be5a60508d3;hpb=abfe65ffb5239060c0c9558d916bbeddee0bc86c;p=collectd.git diff --git a/src/battery.c b/src/battery.c index 9f1bee65..272193ee 100644 --- a/src/battery.c +++ b/src/battery.c @@ -98,7 +98,6 @@ static void battery_submit (const char *plugin_instance, const char *type, doubl vl.values = values; vl.values_len = 1; - vl.time = time (NULL); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "battery", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance)); @@ -315,7 +314,8 @@ static void get_via_generic_iokit (double *ret_charge, #endif /* HAVE_IOKIT_IOKITLIB_H */ #if KERNEL_LINUX -static int battery_read_acpi (const char *name) +static int battery_read_acpi (const char __attribute__((unused)) *dir, + const char *name, void __attribute__((unused)) *user_data) { double current = INVALID_VALUE; double voltage = INVALID_VALUE; @@ -506,7 +506,8 @@ static int battery_read (void) battery_submit ("0", "voltage", voltage); } - walk_directory (battery_acpi_dir, battery_read_acpi); + walk_directory (battery_acpi_dir, battery_read_acpi, + /* user_data = */ NULL); #endif /* KERNEL_LINUX */