From: octo Date: Sat, 28 Jan 2006 10:46:11 +0000 (+0000) Subject: The ACPI code in the `battery' plugin now ignores `dirent's that begin with a dot... X-Git-Tag: collectd-3.7.0~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8a14f7ca2fafb4be247c1c25a72ef30cfb6e5f6;p=collectd.git The ACPI code in the `battery' plugin now ignores `dirent's that begin with a dot `.'. --- diff --git a/src/battery.c b/src/battery.c index 123a05ac..541bab3d 100644 --- a/src/battery.c +++ b/src/battery.c @@ -256,6 +256,9 @@ static void battery_read (void) while ((ent = readdir (dh)) != NULL) { + if (ent->d_name[0] == '.') + continue; + len = snprintf (filename, BUFSIZE, "/proc/acpi/battery/%s/state", ent->d_name); if ((len >= BUFSIZE) || (len < 0)) continue;