* util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper

devices when iterating over /dev/disk/by-id; they will be handled
later if appropriate, which they aren't always (e.g. LVM).
This commit is contained in:
Colin Watson 2010-07-02 17:11:42 +01:00
parent e03ed6c1ee
commit 2bdb2892b3
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2010-07-02 Colin Watson <cjwatson@ubuntu.com>
* util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper
devices when iterating over /dev/disk/by-id; they will be handled
later if appropriate, which they aren't always (e.g. LVM).
2010-07-02 Colin Watson <cjwatson@ubuntu.com>
* include/grub/misc.h (grub_reboot): Declare as noreturn.

View file

@ -519,6 +519,10 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int),
/* Skip partition entries. */
if (strstr (entry->d_name, "-part"))
continue;
/* Skip device-mapper entries; we'll handle the ones we want
later. */
if (strncmp (entry->d_name, "dm-", sizeof ("dm-") - 1) == 0)
continue;
if (names_len >= names_max)
{
names_max *= 2;