Code

Removed `gethostbyname' and replaced with protocol independend `getaddrinfo'
[collectd.git] / src / battery.c
index 123a05acd812915a4095feee5c87e61f3a259cd0..541bab3d09a6d203f43bf6e8d2ddf2be2124a71b 100644 (file)
@@ -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;