From: Colin Watson Date: Fri, 2 Jul 2010 16:11:42 +0000 (+0100) Subject: * util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper X-Git-Tag: 1.99~767 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bdb2892b339fa253e1ca8016ebef52b477ab65d;p=thirdparty%2Fgrub.git * 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). --- diff --git a/ChangeLog b/ChangeLog index e1e7ef00d..dcdb3a7ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-07-02 Colin Watson + + * 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 * include/grub/misc.h (grub_reboot): Declare as noreturn. diff --git a/util/deviceiter.c b/util/deviceiter.c index e3a0ab76d..64d1cae87 100644 --- a/util/deviceiter.c +++ b/util/deviceiter.c @@ -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;