effort by skipping "." and ".." entries up-front.
Suggested by: Michael Lazarev.
+2010-11-24 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/deviceiter.c (grub_util_iterate_devices): Save a bit of
+ effort by skipping "." and ".." entries up-front.
+ Suggested by: Michael Lazarev.
+
2010-11-24 Colin Watson <cjwatson@ubuntu.com>
* grub-core/Makefile.core.def (xz_decompress): Move -lgcc from
necessary. */
for (entry = readdir (dir); entry; entry = readdir (dir))
{
+ /* Skip current and parent directory entries. */
+ if (strcmp (entry->d_name, ".") == 0 ||
+ strcmp (entry->d_name, "..") == 0)
+ continue;
/* Skip partition entries. */
if (strstr (entry->d_name, "-part"))
continue;