]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper
authorColin Watson <cjwatson@ubuntu.com>
Fri, 2 Jul 2010 16:11:42 +0000 (17:11 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 2 Jul 2010 16:11:42 +0000 (17:11 +0100)
devices when iterating over /dev/disk/by-id; they will be handled
later if appropriate, which they aren't always (e.g. LVM).

ChangeLog
util/deviceiter.c

index e1e7ef00d7868ece72107bcb4451188b171095d1..dcdb3a7ae7e8968d1d314bf98cd31eab14423a46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index e3a0ab76dd1f55894eb50df9ff582c8248585a11..64d1cae877447016a3c1386a3026ddc91ff37e5f 100644 (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;