Comment 7 for bug 413345

Revision history for this message
Colin Watson (cjwatson) wrote :

Here's the broken code (possibly other similar bits elsewhere):

int
grub_util_get_dev_abstraction (const char *os_dev UNUSED)
{
#ifdef __linux__
  /* Check for LVM. */
  if (!strncmp (os_dev, "/dev/mapper/", 12))
    return GRUB_DEV_ABSTRACTION_LVM;

  /* Check for RAID. */
  if (!strncmp (os_dev, "/dev/md", 7))
    return GRUB_DEV_ABSTRACTION_RAID;
#endif

  /* No abstraction found. */
  return GRUB_DEV_ABSTRACTION_NONE;
}